things raspberry google aosp java android linux raspberry-pi

java - raspberry - Compilar la aplicación de Android en frambuesa pi



console android things (1)

Quiero compilar una aplicación de Android en un pi raspberry con gradle.

Tengo herramientas de compilación, imágenes SDK y otros datos de mi computadora para el RPI, establezco ANDROID_HOME e instalo la versión de Gradle. Luego, cuando ejecuto el proceso de compilación, aparece este error:

Running gradle assembleRelease on builds/2014427_1738212 Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0 Download http://repo1.maven.org/maven2/com/jakewharton/butterknife/5.0.0/butterknife-5.0.0.pom Download http://repo1.maven.org/maven2/com/jakewharton/butterknife-parent/5.0.0/butterknife-parent-5.0.0.pom Download http://repo1.maven.org/maven2/com/squareup/dagger/dagger/1.2.1/dagger-1.2.1.pom Download http://repo1.maven.org/maven2/com/squareup/dagger/dagger-parent/1.2.1/dagger-parent-1.2.1.pom Download http://repo1.maven.org/maven2/com/squareup/dagger/dagger-compiler/1.2.1/dagger-compiler-1.2.1.pom Download http://repo1.maven.org/maven2/javax/inject/javax.inject/1/javax.inject-1.pom Download http://repo1.maven.org/maven2/com/squareup/javawriter/2.3.0/javawriter-2.3.0.pom Download http://repo1.maven.org/maven2/com/jakewharton/butterknife/5.0.0/butterknife-5.0.0.jar Download http://repo1.maven.org/maven2/javax/inject/javax.inject/1/javax.inject-1.jar Download http://repo1.maven.org/maven2/com/squareup/dagger/dagger/1.2.1/dagger-1.2.1.jar Download http://repo1.maven.org/maven2/com/squareup/javawriter/2.3.0/javawriter-2.3.0.jar Download http://repo1.maven.org/maven2/com/squareup/dagger/dagger-compiler/1.2.1/dagger-compiler-1.2.1.jar :Firext:preBuild :Firext:preReleaseBuild :Firext:checkReleaseManifest :Firext:preDebugBuild :libraries:AndroidBootstrap:compileLint :libraries:AndroidBootstrap:copyReleaseLint UP-TO-DATE :libraries:AndroidBootstrap:mergeReleaseProguardFiles :libraries:AndroidBootstrap:packageReleaseAidl UP-TO-DATE :libraries:AndroidBootstrap:preBuild :libraries:AndroidBootstrap:preReleaseBuild :libraries:AndroidBootstrap:checkReleaseManifest :libraries:AndroidBootstrap:prepareReleaseDependencies :libraries:AndroidBootstrap:compileReleaseAidl :libraries:AndroidBootstrap:compileReleaseRenderscript :libraries:AndroidBootstrap:generateReleaseBuildConfig :libraries:AndroidBootstrap:mergeReleaseAssets :libraries:AndroidBootstrap:generateReleaseResValues :libraries:AndroidBootstrap:generateReleaseResources :libraries:AndroidBootstrap:packageReleaseResources :libraries:AndroidBootstrap:processReleaseManifest :libraries:AndroidBootstrap:processReleaseResources FAILED BUILD FAILED Total time: 13 mins 10.381 secs { [Error: Command failed: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 1: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �������!8__PAGEZERO__TEXT: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 2: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 3: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 3: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 2: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: ��__symbol_stub__TEXT: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 4: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt:�__stub_helper__TEXT$�: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 5: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: $�: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 6: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �__cstring__TEXT��: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 7: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 8: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: Syntax error: "(" unexpected FAILURE: Build failed with an exception. * What went wrong: Execution failed for task '':libraries:AndroidBootstrap:processReleaseResources''. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt package -f --no-crunch -I /home/pi/android/android-sdk-linux/platforms/android-4.4/android.jar -M /home/pi/dev/firext/cifirext/builds/2014427_1738212/libraries/AndroidBootstrap/build/bundles/release/AndroidManifest.xml -S /home/pi/dev/firext/cifirext/builds/2014427_1738212/libraries/AndroidBootstrap/build/bundles/release/res -A /home/pi/dev/firext/cifirext/builds/2014427_1738212/libraries/AndroidBootstrap/build/bundles/release/assets -m -J /home/pi/dev/firext/cifirext/builds/2014427_1738212/libraries/AndroidBootstrap/build/source/r/release --non-constant-id --output-text-symbols /home/pi/dev/firext/cifirext/builds/2014427_1738212/libraries/AndroidBootstrap/build/bundles/release Error Code: 2 Output: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 1: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �������!8__PAGEZERO__TEXT: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 2: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 3: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 3: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 2: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: ��__symbol_stub__TEXT: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 4: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt:�__stub_helper__TEXT$�: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 5: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: $�: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 6: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �__cstring__TEXT��: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 7: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: �: not found /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: 8: /home/pi/android/android-sdk-linux/build-tools/19.0.3/aapt: Syntax error: "(" unexpected * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. ] killed: false, code: 1, signal: null }

En mi pc normal esta compilación está bien ... ¿cuál es el problema?


Entiendo que hayas copiado las herramientas de compilación que funcionan en tu computadora, muy probablemente una arquitectura x86 para el PI, que es ARM.

Si hago un

file .../aapt

en mi computadora, obtengo

ELF 32-bit LSB executable, Intel 80386 ...

que ciertamente no funcionará en la arquitectura ARM. Los extraños mensajes de error también apuntan en esta dirección. Una respuesta en el foro de frambuesa pi indica que no tiene suerte.