cordova添加平台android命令失败
我打字时遇到了一个非常奇怪的问题 cordova平台添加android 按下[Enter]键后,出现以下错误:cordova添加平台android命令失败,android,apache,cordova,Android,Apache,Cordova,我打字时遇到了一个非常奇怪的问题 cordova平台添加android 按下[Enter]键后,出现以下错误: [Error: The command 'android' failed. Make sure you have the latest Android SDK installed, and the 'android' command (inside the tools/ folder) added to your path. Output: ] 但是,我已经正确地设置了我的路径,证明
[Error: The command 'android' failed. Make sure you have the latest Android SDK installed, and the 'android' command (inside the tools/ folder) added to your path. Output: ]
但是,我已经正确地设置了我的路径,证明是当我键入android命令、java、ant或adb时,它工作正常,但显然不适用于Cordova
你能帮帮我吗?
非常感谢。在通过命令提示符为cordova添加android平台时,我也遇到了同样的问题 非常简单的开放式Android SDK管理器 并在Android SDK平台(4.2.2)上安装最新版本 如您所见,安装了最新的sdk平台版本,即4.2.2。 所以,做同样的事情,应该可以解决你的问题 现在再次尝试运行命令,为cordova添加android平台。 添加android平台
希望这将对您有所帮助。根据您安装的Android SDK检查project.properties和AndroidManifest文件,了解Android SDK的API级别 步骤:
- 在
文件(source.properties
)中查找您的android sdk详细信息。基本上可以找到{android sdk}/platforms/android-x.x/
AndroidVersion.ApiLevel
- 编辑您的
文件(project.properties
)并根据{project\u name}/platforms/android/
a更改android.ApiLevel
atarget=android xx
- 编辑您的
文件(AndroidManifest
),并相应地更改{Project\u name}/platforms/android/
)android:targetSdkVersion=“xx”
希望它能工作。它不能解决我的问题,即使重新启动计算机,同样的错误仍然出现。