我尝试使用raspebrry pi b +上的终端创建apk但每次我们都显示此错误:
pi@raspberrypi /var/www/html/app-get/newapplication $ sudo ./gradlew assembleDebug
:mobile:preBuild UP-TO-DATE
:mobile:preFlossDebugBuild UP-TO-DATE
:mobile:checkFlossDebugManifest
:mobile:preFlossReleaseBuild UP-TO-DATE
:mobile:preGplayDebugBuild UP-TO-DATE
:mobile:preGplayReleaseBuild UP-TO-DATE
:mobile:prepareComAmulyakhareComAmulyakhareTextdrawable101Library UP-TO-DATE
:mobile:prepareComAndroidSupportAppcompatV72103Library
Support for reading or changing file permissions is only available on this platform using Java 7 or later.
:mobile:prepareComAndroidSupportRecyclerviewV72103Library
:mobile:prepareComAndroidSupportSupportV42103Library
:mobile:prepareComMelnykovFloatingactionbutton130Library
:mobile:prepareFlossDebugDependencies
:mobile:compileFlossDebugAidl
:mobile:compileFlossDebugRenderscript
:mobile:generateFlossDebugBuildConfig
:mobile:generateFlossDebugAssets UP-TO-DATE
:mobile:mergeFlossDebugAssets
:mobile:generateFlossDebugResValues
:mobile:generateFlossDebugResources
:mobile:mergeFlossDebugResourcesAAPT err(Facade for 17718085): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 12465622): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 11142540): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 14213640): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 21726721): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 30470707): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 30057086): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 8572351): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 10208178): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 14197974): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 12422350): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 7208668): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 1607509): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 25709829): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 1731843): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
Exception in thread "png-cruncher_1" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_2" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_4" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_5" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_3" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
AAPT err(Facade for 20855356): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 28455207): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 2084630): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 9663360): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 32500053): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
Exception in thread "png-cruncher_10" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_8" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_9" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_6" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_7" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_11" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_14" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_13" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_15" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_12" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_16" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_20" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_18" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_19" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_17" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
在raspberry pi中我安装了openjdk 8而不是Oracle JDK,因为我无法安装。 我在不同的Windows PC和Android工作室上尝试了相同的应用程序,它没有问题。
知道某人如何解决此错误?
答案 0 :(得分:1)
"超时"消息实际上只是说我们等待的工作失败了。这些是有趣的错误:
AAPT err(Facade for 12465622): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 11142540): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 14213640): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 21726721): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 30470707): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 30057086): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 8572351): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 10208178): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 14197974): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 12422350): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 7208668): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 1607509): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 25709829): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
AAPT err(Facade for 1731843): /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected
为了节省一些水平滚动,他们都说Syntax error: "(" unexpected
。
查看the source code,我们可以看到AaptProcess通过stdin / stdout与长时间运行的aapt
子进程通信。
我认为"语法错误"消息来自那次沟通。
要验证这一点,您可以手动运行aapt
工具。使用m
的arg进入(未记录的,据我所知?)交互模式。然后,png crunch命令由三行组成:s
,infilepath
,outfilepath
。它看起来像这样:
~$ /home/snild/.androidsdk/build-tools/23.0.1/aapt m
Ready
s
/tmp/icon.png
/tmp/icon-crunched.png
Crunching /tmp/icon.png
Crunching single PNG file: /tmp/icon.png
Output file: /tmp/icon-crunched.png
Done
s
/tmp/icon2.png
/tmp/icon2-crunched.png
Crunching /tmp/icon2.png
Crunching single PNG file: /tmp/icon2.png
Output file: /tmp/icon2-crunched.png
Done
这对我来说很好,但我在笔记本电脑上运行。看看它是否适用于您的Raspberry Pi,这很有趣。
更新1:它没有。
$ sudo /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt m
/mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: 1: /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt: Syntax error: "(" unexpected`
这意味着你的PNG路径并不奇怪,因为aapt永远不会那么远。接下来,让我们尝试通过检查它是否可以执行任何操作来缩小问题范围。尝试在没有m参数的情况下运行它 - 它应该打印一些文档;可以?尝试运行aapt list something.apk,这有用吗?并且可以给出一些线索。
更新2:它仍然以同样的方式失败,即使没有" m" ARG。 strace和ltrace调用提供了更多信息:
$ strace /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt
execve("/mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt", ["/mnt/sda1/android-sdk-linux/buil"..., "m"], [/* 19 vars */]) = -1 ENOEXEC (Exec format error)
write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error ) = 32
exit_group(1) = ?
+++ exited with 1 +++
$ ltrace /mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt
"/mnt/sda1/android-sdk-linux/build-tools/22.0.1/aapt" is ELF from incompatible architecture
这意味着您拥有的aapt
二进制文件是针对不兼容的体系结构(可能是x86 / Intel,或者只是一个较新的ARM指令集)编译的。您可以使用file /path/to/aapt
获取有关可执行文件的一些详细信息。将此与您知道在系统上工作的内容进行比较,例如file /bin/bash
。你应该看到他们的不同。
在任何情况下,结论都是您下载了与您的平台不兼容的构建工具(Raspberry Pi)。我不确定ARM架构是否有官方下载。您可以尝试自己编译工具,或尝试在某处找到合适的二进制文件。