Не могу создать apk на Raspberry Pi

Я пытаюсь создать apk, используя терминал на моем raspebrry pi b+, но каждый раз, когда мы показываем эту ошибку:

    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 и Android-студии, и оно работало без проблем.

Кто-нибудь знает, как решить эту ошибку?

1 ответ

Сообщения "Timed out" на самом деле просто говорят о том, что работа, которую мы ждали, провалилась. Вот интересные ошибки:

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,

Глядя на исходный код, мы видим, что AaptProcess связывается с долгосрочным aapt дочерний процесс через стандартный ввод / вывод.

Я думаю, что сообщение "Синтаксическая ошибка" приходит из этого сообщения.

Чтобы убедиться в этом, вы можете запустить aapt инструмент вручную. Используйте аргумент m чтобы войти в (недокументированный, насколько я могу судить?) интерактивный режим. Затем команда 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 что-то.apk, это работает? strace aapt m и ltrace aapt m могут дать некоторые подсказки.

Обновление 2: все равно не удалось, даже без аргумента "m". Вызовы 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. Вы можете попробовать скомпилировать инструменты самостоятельно или найти подходящие файлы для скачивания где-нибудь.

Другие вопросы по тегам