问题描述
我在我的Ubuntu 13.10 64位的文件最新的Android SDK工具folder.The Eclipse和SDK工作正常,也创造了一个虚拟设备。
CD文件
CD ADT-束Linux的x86_64-20130514 /
CD SDK /
ls -l命令
这给了我这些,
插件
构建工具
文档
演员
平台
平台工具
样本
来源
系统图像
温度
工具
现在安装蚂蚁
使用命令和apt-get安装蚁
然后编辑路径,
的gedit的〜/ .bashrc
而在结尾添加此code,
#AndroidDev PATH
出口PATH = $ {PATH}:〜/文档/ ADT-束Linux的x86_64-20130514 / SDK /工具
出口PATH = $ {PATH}:〜/文档/ ADT-束Linux的x86_64-20130514 / SDK /平台的工具
现在,当我试图android平台添加到示例项目,它会抛出错误,
CD你好
科尔多瓦平台添加的android
错误,
创建Android项目.../home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:126
Ë扔掉;
^
错误:同时列出Android的目标发生了错误
在/home/######/.cordova/lib/android/cordova/3.4.0/bin/lib/check_reqs.js:87:29
在_rejected(/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:808:24)
在/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:834:30
在Promise.when(/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:1079:31)
在Promise.promise.promiseDispatch(/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:752:41)
在/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:574:44
在冲洗(/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:108:17)
在process._tickCallback(的node.js:415:13)
错误:/home/######/.cordova/lib/android/cordova/3.4.0/bin/create:命令失败,退出code 8
在ChildProcess.whenDone(/usr/lib/node_modules/cordova/src/superspawn.js:112:23)
在ChildProcess.EventEmitter.emit(events.js:98:17)
在maybeClose(child_process.js:743:16)
在Process.ChildProcess._handle.onexit(child_process.js:810:5)
我发现了同样的问题的解决方案。我不知道究竟是什么解决办法,但我解决了它,因为它:
-
我从头开始。在备份我的项目文件夹
myproject.bak
文件夹以及推出的PhoneGap创建的myproject
-
CD的myproject
-
科尔多瓦平台添加的android
-
我复制从
myproject.bak
我的项目资源投入到我新的的myproject
-
咕噜的PhoneGap:建筑:机器人
这时我有,因为在我谟口音的文件已经是一个错误。我发现这个错误使用下面的命令:
蚂蚁调试-f/home/grattepoil/path/to/my/project/platforms/android/build.xml-Dout.dir = Ant的构建-Dgen.absolute .DIR =蚂蚁根-LogFile登录ant.txt
I have the android latest sdk tools in my Ubuntu 13.10 x64 Documents folder.The eclipse and sdk are working fine,also created one virtual device.
cd Documents
cd adt-bundle-linux-x86_64-20130514/
cd sdk/
ls -l
It gives me these,
add-ons
build-tools
docs
extras
platforms
platform-tools
samples
sources
system-images
temp
tools
Now installed ant
using sudo apt-get install ant
Then edited path,
gedit ~/.bashrc
And added this code at end,
#AndroidDev PATH
export PATH=${PATH}:~/Documents/adt-bundle-linux-x86_64-20130514/sdk/tools
export PATH=${PATH}:~/Documents/adt-bundle-linux-x86_64-20130514/sdk/platform-tools
Now when I tried to add android platform to sample project, it throws error,
cd hello
cordova platform add android
The error,
Creating android project...
/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:126
throw e;
^
Error: An error occurred while listing Android targets
at /home/######/.cordova/lib/android/cordova/3.4.0/bin/lib/check_reqs.js:87:29
at _rejected (/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:808:24)
at /home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:834:30
at Promise.when (/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:1079:31)
at Promise.promise.promiseDispatch (/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:752:41)
at /home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:574:44
at flush (/home/######/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
Error: /home/######/.cordova/lib/android/cordova/3.4.0/bin/create: Command failed with exit code 8
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/src/superspawn.js:112:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I found a solution for the same problem. I don't know what is exactly the solution but i solved it as it :
I restart from scratch. Backup my project folder in
myproject.bak
folder andlaunch phonegap create myproject
cd myproject
cordova platform add android
I copied my project resources from
myproject.bak
into my newmyproject
grunt phonegap:build:android
At this time i have already an error because of a file with accent in my projet. I found this error with the following command :
ant debug -f "/home/grattepoil/path/to/my/project/platforms/android/build.xml" -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen -logfile log-ant.txt
这篇关于科尔多瓦加平台的错误在Ubuntu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!