[英]PhoneGap/Cordova: Libs does not exist
I've just downloaded Cordova, along with all the requirements for Android and Windows Phone. 我刚刚下载了Cordova,以及Android和Windows Phone的所有要求。 I can successfully build a WP8 image and send it to my 8X, however, I can't seem to be able to build an Android image.
我可以成功构建WP8图像并将其发送到我的8X,但是,我似乎无法构建Android图像。
When I execute cordova build android
, I get the following error: 当我执行
cordova build android
,出现以下错误:
Generating config.xml from defaults for platform "android" Preparing android project Compiling app on platform "android" via command "cmd" /c Y:\\mobile\\platforms\\android\\cordova\\build 从默认值为平台“ android”生成config.xml通过命令“ cmd” / c Y:\\ mobile \\ platforms \\ android \\ cordova \\ build在平台“ android”上准备android项目编译应用
C:\Users\x\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:126
throw e;
^
Error: An error occurred while building the android project.
at ChildProcess.<anonymous> (C:\Users\x\AppData\Roaming\npm\node_modules\cordova\src\compile.js:65:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
And when I launch the build command manually, I get the following error: 当我手动启动build命令时,出现以下错误:
Error executing "ant debug -f "Y:\mobile\platforms\android\build.xml"":
BUILD FAILED
C:\Development\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:962: The following error occurred while executing this line:
C:\Development\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:973: The following error occurred while executing this line:
C:\Development\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:313: com.android.sdklib.build.ApkCreationException: Y:\mobile\platforms\android\bin\rs
Libs does not exist
at com.android.sdklib.build.ApkBuilder.getNativeFiles(ApkBuilder.java:742)
at com.android.ant.ApkBuilderTask.execute(ApkBuilderTask.java:303)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
It seems that the cordova-3.3.0.jar file doesn't get compiled, shouldn't it get compiled automatically? 似乎cordova-3.3.0.jar文件没有编译,不是应该自动编译吗? Is there anything I'm missing?
有什么我想念的吗?
It can be an error with Ant. Ant可能是错误。 I had this error because I forgot to change the environment variable path.
我遇到此错误是因为我忘记更改环境变量路径。
The path I added was wrong (you need to specify this folder: "way\\to\\apache-ant-1.9.3\\bin"). 我添加的路径错误(您需要指定此文件夹:“ way \\ to \\ apache-ant-1.9.3 \\ bin”)。 I just changed it and it works now.
我刚刚更改了它,现在可以使用了。
(If it's not that, it can be an other path environment variable such as node, or your java sdk or android sdk) (如果不是,则它可以是其他路径环境变量,例如node或Java sdk或android sdk)
Hope it can help someone. 希望它可以帮助某人。
I just deleted the whole Android project, recompiled the CordovaLibs and recompiled the Android project. 我只是删除了整个Android项目,重新编译了CordovaLibs,然后重新编译了Android项目。 Seems to have fixed it.
似乎已修复它。
try commands 尝试命令
cordova platform rm android
cordova platform add android
cordova build android
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.