欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

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

程序员文章站 2022-05-21 16:22:00
问题:execute failed: java.io.ioexception: cannot run program “/usr/local/android-sdk-l...

问题: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++语言库。
解决方案:

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