我正尝试通过电话CLI与终端在我的Mac上运行“cordova build android”。使用Cordova 3.1构建Android应用程序时出错CLI
首先我下载了Android SDK。
然后我建立了项目并添加了android。
然后我试图“科尔多瓦构建Android”,并收到以下错误:
Error: An error occurred while building the android project. Please install Android target 17 (the Android newest SDK). Make sure you have the latest Android tools installed as well. Run "android" from your command-line to install/update any missing SDKs or tools.
所以我跑了“机器人”,并安装了所有的目标17
相关然后我试图“科尔多瓦构建Android “再次收到以下编译错误:
-compile: [javac] Compiling 3 source files to /Users/johnmacadam/Desktop/com.test.hello/platforms/android/bin/classes [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/src/com/ZZZ.java:20: ';' expected [javac] package com.humorthatworks.501ways; [javac] ^ [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/src/com/ZZZ.java:25: expected [javac] public class 501Ways extends CordovaActivity [javac] ^ [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/src/com/ZZZ.java:25: expected [javac] public class ZZZ extends CordovaActivity [javac] ^ [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/src/com/ZZZ.java:25: expected [javac] public class ZZZ extends CordovaActivity [javac] ^ [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/gen/com/ZZZ/BuildConfig.java:2: ';' expected [javac] package com.ZZZ; [javac] ^ [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/gen/com/ZZZ/R.java:8: ';' expected [javac] package com.ZZZ; [javac] ^ [javac] 6 errors
BUILD FAILED /Users/johnmacadam/Documents/adt-bundle/sdk/tools/ant/build.xml:720: The following error occurred while executing this line: /Users/johnmacadam/Documents/adt-bundle/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
任何想法/建议吗?
是的,这是它! –