gpt4 book ai didi

android - Phonegap/Cordova 构建失败 ArrayIndexOutOfBoundsException : 1

转载 作者:行者123 更新时间:2023-11-29 17:48:21 25 4
gpt4 key购买 nike

我是 phonegap 的新手,今天我尝试使用 phonegap 启动一个 angular.js 应用程序。示例初学者应用程序很好,但是一旦我删除了 www 文件夹中的所有文件并将它们替换为 anulgar.js 应用程序,一切都停止了。 (注意:我确实包含了 cordova.js 文件)。这是我在尝试键入 cordova build android 时在 cmd 中遇到的错误:

BUILD FAILED
C:\Development\adt-bundle\sdk\tools\ant\build.xml:932: The following error occur
red while executing this line:
C:\Development\adt-bundle\sdk\tools\ant\build.xml:950: java.lang.ArrayIndexOutOf
BoundsException: 1
at com.android.ant.DependencyGraph.parseDependencyFile(DependencyGraph.j
ava:180)
at com.android.ant.DependencyGraph.<init>(DependencyGraph.java:54)
at com.android.ant.SingleDependencyTask.initDependencies(SingleDependenc
yTask.java:87)
at com.android.ant.AaptExecTask.execute(AaptExecTask.java:509)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java:124)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a: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)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 7 seconds
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,F:\WorkSpace\BikeDic
e\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: F:\WorkSpace\BikeDice\platforms\android\cordova\build.bat: Command failed
with exit code 2
at ChildProcess.whenDone (C:\Users\Admin\AppData\Roaming\npm\node_modules\co
rdova\node_modules\cordova-lib\src\cordova\superspawn.js:135: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)

PS:我没有使用 node.js 或任何服务器端技术。据我所知,我不需要为了将 angular.js 与 phonegap 一起使用。

最佳答案

尝试从您的项目中删除 ant-build 和 ant-gen 文件夹并重新构建它。

关于android - Phonegap/Cordova 构建失败 ArrayIndexOutOfBoundsException : 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24808709/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com