【发布时间】:2015-04-09 14:57:38
【问题描述】:
我是 cordova 开发的新手,我使用此命令创建了我的第一个 cordova 项目,如下面的站点 https://cordova.apache.org/docs/en/4.0.0/guide_cli_index.md.html
cordova create hello com.example.hello HelloWorld
使用这些命令将平台添加到项目后,
cd hello
cordova platform add android
命令行给出这些输出
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.exampple.hell
Name: helloWorld
Android target: android-21
Copying template files...
Project successfully created.
根据这个项目的这个 Android 目标是 android-21 但在我的机器上安装的 android SDK 只有 android API 级别 19。所以当我将这些项目导入 eclipse IDE 以对项目进行进一步更改时,它会给出错误控制台
Unable to resolve target 'android-21'
我将 AndroidManifest.xml 文件更改为
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
但还是有问题。
当平台添加到项目时,我可以将 android 目标更改为 19,还是有其他方法可以解决此问题并使用 android API 级别 19 运行项目
【问题讨论】: