2

我正在尝试在我的系统(ubuntu)上构建 native-android,但我得到 java.io.IOException:

   [ant]   [mergemanifest] No changes in the AndroidManifest files.
   [ant]        [echo] Handling aidl files...
   [ant]        [aidl] No AIDL files to compile.
   [ant]        [echo] ----------
   [ant]        [echo] Handling RenderScript files...
   [ant]        [echo] ----------
   [ant]        [echo] Handling Resources...
   [ant]        [aapt] Generating resource IDs...
   [ant]    [warn]  
   [ant]   BUILD FAILED
   [ant]   /home/grzegorz/android-sdk-linux/tools/ant/build.xml:601: The following error occurred while executing this line:
   [ant]   /home/grzegorz/android-sdk-linux/tools/ant/build.xml:653: The following error occurred while executing this line:
   [ant]   /home/grzegorz/android-sdk-linux/tools/ant/build.xml:698: Execute failed: java.io.IOException: Cannot run program "/home/grzegorz/android-sdk-linux/build-tools/19.0.3/aapt" (in directory "/home/grzegorz/devkit/addons/native-android/TeaLeaf"): error=2, Nie ma takiego pliku ani katalogu (Translation: "No such file or directory")
   [ant]   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
   [ant]   at java.lang.Runtime.exec(Runtime.java:617)
   [ant]   at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
   [ant]   at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
   [ant]   at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
   [ant]   at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
   [ant]   at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
   [ant]   at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
   [ant]   at com.android.ant.AaptExecTask.execute(AaptExecTask.java:699)
   [ant]   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
   [ant]   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [ant]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [ant]   at java.lang.reflect.Method.invoke(Method.java:606)
   [ant]   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [ant]   at org.apache.tools.ant.Task.perform(Task.java:348)
   [ant]   at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
   [ant]   at com.android.ant.IfElseTask.execute(IfElseTask.java:120)
   [ant]   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
   [ant]   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [ant]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [ant]   at java.lang.reflect.Method.invoke(Method.java:606)
   [ant]   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [ant]   at org.apache.tools.ant.Task.perform(Task.java:348)
   [ant]   at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
   [ant]   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
   [ant]   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [ant]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [ant]   at java.lang.reflect.Method.invoke(Method.java:606)
   [ant]   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [ant]   at org.apache.tools.ant.Task.perform(Task.java:348)
   [ant]   at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
   [ant]   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
   [ant]   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [ant]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [ant]   at java.lang.reflect.Method.invoke(Method.java:606)
   [ant]   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [ant]   at org.apache.tools.ant.Task.perform(Task.java:348)
   [ant]   at org.apache.tools.ant.Target.execute(Target.java:435)
   [ant]   at org.apache.tools.ant.Target.performTasks(Target.java:456)
   [ant]   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
   [ant]   at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
   [ant]   at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
   [ant]   at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
   [ant]   at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:303)
   [ant]   at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:221)
   [ant]   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
   [ant]   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [ant]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [ant]   at java.lang.reflect.Method.invoke(Method.java:606)
   [ant]   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [ant]   at org.apache.tools.ant.Task.perform(Task.java:348)
   [ant]   at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
   [ant]   at com.android.ant.IfElseTask.execute(IfElseTask.java:120)
   [ant]   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
   [ant]   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [ant]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [ant]   at java.lang.reflect.Method.invoke(Method.java:606)
   [ant]   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [ant]   at org.apache.tools.ant.Task.perform(Task.java:348)
   [ant]   at org.apache.tools.ant.Target.execute(Target.java:435)
   [ant]   at org.apache.tools.ant.Target.performTasks(Target.java:456)
   [ant]   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
   [ant]   at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
   [ant]   at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   [ant]   at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
   [ant]   at org.apache.tools.ant.Main.runBuild(Main.java:851)
   [ant]   at org.apache.tools.ant.Main.startAnt(Main.java:235)
   [ant]   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
   [ant]   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
   [ant]   Caused by: java.io.IOException: error=2, Nie ma takiego pliku ani katalogu
   [ant]   at java.lang.UNIXProcess.forkAndExec(Native Method)
   [ant]   at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
   [ant]   at java.lang.ProcessImpl.start(ProcessImpl.java:130)
   [ant]   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
   [ant]   ... 68 more
   [ant]   
   [ant]   Total time: 9 seconds
   [ant]    [warn]  


   [ant]    [error]  (ant exited with code 1)
   [native-android]    [error]  Build failure: 1 undefined
   root@grzegorz-Virtual-Machine:/home/grzegorz/devkit/projects/whack-that-mole#

“/home/grzegorz/android-sdk-linux/build-tools/19.0.3/aapt”和“/home/grzegorz/devkit/addons/native-android/TeaLeaf”目录都存在

我以 su 的权限运行的所有内容。有人知道我做错了什么吗?

4

1 回答 1

1

好的,我发现 ubuntu x64 中的解决方案缺少一些 x84 库

sudo dpkg --add-architecture i386
sudo apt-get -qqy update
sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386

解决问题

于 2014-03-24T00:06:51.930 回答