本文介绍了不能让蚂蚁工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的Ubuntu 12.04运行科尔多瓦。当我尝试创建项目,它扔我这个错误
K @ K-厘米:〜/开发/ Android的/离子/你好$科尔多瓦平台添加的android
检查Android的要求...
创建Android项目...
[错误:创建机器人子项目时发生错误。看起来像你的环境完全支持科尔多瓦,Android开发!
创建为Android平台科尔多瓦项目:
路径:平台/机器人
包装:com.ionic.toderp
名称:toderp
Android的目标:Android的17
建筑科尔多瓦-3.2.0.jar{[错误:命令失败:
构建失败
在执行这条线出现以下错误:/home/k/Dev/android-sdk-linux/tools/ant/build.xml:710:
/home/k/Dev/android-sdk-linux/tools/ant/build.xml:723:无法找到javac编译器;
com.sun.tools.javac.Main不在类路径中。
也许JAVA_HOME不指向JDK。
它当前设置为/ usr / lib目录/ JVM / Java的7-的OpenJDK-I386 / JRE总时间:0秒
]杀:假的,code:1,信号:空}
]
下面是我的PATH
<$p$p><$c$c>/usr/lib/jvm/java-7-openjdk-i386:/home/k/Dev/android-sdk-linux/tools:/home/k/Dev/android-sdk-linux/tools:/home/k/Downloads/android-ndk-r8e:/home/k/Downloads/android-ndk-r8e:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/k/Home/k/Dev/android-sdk-linux/tools:/home/k/Home/k/Dev/android-sdk-linux/platform-tools:/usr/lib/jvm/java-7-openjdk-i386/binJAVA_HOME
/ usr / lib目录/ JVM / Java的7-的OpenJDK-I386
请帮帮忙!
解决方案
此问题是由于蚂蚁不能找到tools.jar文件。
您需要复制tools.jar文件,并把它在lib文件夹蚂蚁工作。
做从其他SDK库的lib文件夹中的tools.jar文件搜索,并把在错误上面的路径。
I am trying to run Cordova on my ubuntu 12.04. When I try to create the project, its throwing me this error
k@k-cm:~/Development/Android/ionic/hello$ cordova platform add android
Checking Android requirements...
Creating android project...
[Error: An error occured during creation of android sub-project. Looks like your environment fully supports cordova-android development!
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.ionic.toderp
Name: toderp
Android target: android-17
Building cordova-3.2.0.jar
{ [Error: Command failed:
BUILD FAILED
/home/k/Dev/android-sdk-linux/tools/ant/build.xml:710: The following error occurred while executing this line:
/home/k/Dev/android-sdk-linux/tools/ant/build.xml:723: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-7-openjdk-i386/jre"
Total time: 0 seconds
] killed: false, code: 1, signal: null }
]
Here is my PATH
/usr/lib/jvm/java-7-openjdk-i386:/home/k/Dev/android-sdk-linux/tools:/home/k/Dev/android-sdk-linux/tools:/home/k/Downloads/android-ndk-r8e:/home/k/Downloads/android-ndk-r8e:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/k/Home/k/Dev/android-sdk-linux/tools:/home/k/Home/k/Dev/android-sdk-linux/platform-tools:/usr/lib/jvm/java-7-openjdk-i386/bin
JAVA_HOME
/usr/lib/jvm/java-7-openjdk-i386
Please help!
解决方案
This issue is due to that Ant can not find the tools.jar file.
You need to copy the tools.jar file and put it in the lib folder for the ant to work.
Do a search for tools.jar file in the lib folders from other sdk libraries and put that in the above path in error.
这篇关于不能让蚂蚁工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!