use*_*505 9 java ant android cordova
我一直在这个网站上,所以请原谅我,如果其他人发布了这个,但我找不到任何可以解决我的问题.
我正在使用Mac.通过我的IOS构建,我完全没有问题.
但是对于Android,我"现在"有一些问题,当我运行时,cordova build android 我得到以下错误,
/Users/x/Library/Android/sdk/tools/ant/build.xml:601: The following error occurred while executing this line:
/Users/x/Library/Android/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/Users/x/Library/Android/sdk/tools/ant/build.xml:734: Class not found: javac1.8
/Users/x/Desktop/One/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,/Users/x/Desktop/test/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
ERROR building one of the platforms: Error: /Users/x/Desktop/test/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Run Code Online (Sandbox Code Playgroud)
我使用'now'这个词,因为这个错误,我认为我已经修复了它并且它正在工作但我没有改变PATHS任何地方在我的终端,我可以运行javac - version,这给了我javac 1.8.0_25.所以它可以不同看java.
所以我认为Apache Ant可能出错了,但是当我运行时,ant -version我得到Apache Ant(TM) version 1.9.4 compiled on April 29 2014- 所以是的,我正在运行Ant版本1.9.4,据我所知,应该使用我的java版本?
所以我的系统可以访问但java和ant没有任何问题,但我无法构建我的新Android应用程序.我现在在一个干净的,新的(没有任何插件或我的代码)构建中运行它仍然它将无法正常工作.
有帮助吗?
谢谢
我解决了我的问题.在我的config.xml上,我错过了平台标签,以便配置图标和启动画面:
<platform name="ios">
</platform>
<platform name="android">
</platform>
Run Code Online (Sandbox Code Playgroud)
也许你有像我这样错误配置的东西.希望能帮助到你
use*_*505 -2
抱歉发帖晚了,我都忘了这篇文章了。我解决了我的问题。我不知道为什么我遇到了问题,但我重新构建了我的 Mac,我安装了自制程序来管理 ant,这解决了我的所有问题。
| 归档时间: |
|
| 查看次数: |
27755 次 |
| 最近记录: |