当前位置: 首页 > 工具软件 > doa-tools > 使用案例 >

Cannot run program "/usr/local/android-sdk-linux/build-tools/23.0.2/aapt": error=2, No such file or

苏彭薄
2023-12-01

问题:Execute failed: java.io.IOException: Cannot run program “/usr/local/android-sdk-linux/build-tools/23.0.2/aapt”: error=2, No such file or directory

原因:在64位Linux下打包成APK时缺少x86下C++语言库。
解决方案:参考:https://stackoverflow.com/questions/17474401/cannot-run-program-xx-sdk-tools-emulator-java-io-ioexception-error-2-no-s

sudo apt-get install libncurses5:i386 \
                   libstdc++6:i386 \
                   zlib1g:i386

最终完美解决

Executing tasks: [:app:assembleArm7Debug]

Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preArm7DebugBuild UP-TO-DATE
:app:checkArm7DebugManifest
:app:prepareArm7DebugDependencies
:app:compileArm7DebugAidl UP-TO-DATE
:app:compileArm7DebugRenderscript UP-TO-DATE
:app:generateArm7DebugBuildConfig UP-TO-DATE
:app:generateArm7DebugResValues UP-TO-DATE
:app:generateArm7DebugResources UP-TO-DATE
:app:mergeArm7DebugResources
:app:processArm7DebugManifest
:app:processArm7DebugResources
:app:generateArm7DebugSources
:app:incrementalArm7DebugJavaCompilationSafeguard
:app:compileArm7DebugJavaWithJavac
:app:compileArm7DebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:app:generateJsonModelArm7Debug
:app:externalNativeBuildArm7Debug
:app:compileArm7DebugSources
:app:mergeArm7DebugShaders
:app:compileArm7DebugShaders
:app:generateArm7DebugAssets
:app:mergeArm7DebugAssets
:app:transformClassesWithDexForArm7Debug

Running dex as a separate process.

To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB.
To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html

:app:mergeArm7DebugJniLibFolders
:app:transformNative_libsWithMergeJniLibsForArm7Debug
:app:transformNative_libsWithStripDebugSymbolForArm7Debug
:app:processArm7DebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForArm7Debug
:app:validateSigningArm7Debug
:app:packageArm7Debug
:app:assembleArm7Debug

BUILD SUCCESSFUL

Total time: 17.095 secs
 类似资料: