Cannot run program "XXXXX/android-sdks/build-tools/aapt.exe": error=2,

本文详细介绍了在Ubuntu64位系统下使用AndroidSDK时遇到的问题及解决方案,通过安装特定依赖库(如ia32-libs、libc6-i386等),最终实现了在64位系统上的正常运行。

在ubuntu64位系统下使用android SDK,经常出这个问题。

这个问题是因为sdk的工具大都支持32位,然而我的系统是64位,所以无法在64位上运行。

网上找了好多资料

第一种就是 安装 ia32-libs

sudo apt-get install ia32-libs 

结果这个依赖 ia32-libs-multiarch , 把 ia32-libs-multiarch 这个也装起,总之好麻烦。 就没弄成功。

第二种,我搜索到 http://www.cnblogs.com/sink_cup/archive/2011/10/31/ubuntu_x64_android_sdk_java.html 这个链接,按照里面的说法 安装下面的几个库,就可以了。

sudo apt-get install -y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1

对我来说,第二种方法一下子就生效了。 太不容易了。
构建进程终止异常: "C:\Program Files\Java\jdk-17\bin\java.exe" -Xmx700m -Djava.awt.headless=true --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -Dio.netty.initialSeedUniquifier=2910706704017270818 -Dfile.encoding=GBK -Duser.language=zh -Duser.country=CN -Didea.paths.selector=IntelliJIdea2021.2 -Djps.language.bundle=C:/Users/HammerWang/AppData/Roaming/JetBrains/IntelliJIdea2021.2/plugins/zh.212.324/lib/zh.212.324.jar "-Didea.home.path=D:/Program Files/IntelliJ IDEA 2021.2.3" -Didea.config.path=C:/Users/HammerWang/AppData/Roaming/JetBrains/IntelliJIdea2021.2 -Didea.plugins.path=C:/Users/HammerWang/AppData/Roaming/JetBrains/IntelliJIdea2021.2/plugins -Djps.log.dir=C:/Users/HammerWang/AppData/Local/JetBrains/IntelliJIdea2021.2/log/build-log "-Djps.fallback.jdk.home=D:/Program Files/IntelliJ IDEA 2021.2.3/jbr" -Djps.fallback.jdk.version=11.0.12 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=C:/Users/HammerWang/AppData/Local/JetBrains/IntelliJIdea2021.2/compile-server/aipsy_b3c516dd/_temp_ -Djps.backward.ref.index.builder=true -Dtmh.instrument.annotations=true -Dtmh.generate.line.numbers=true -Dkotlin.incremental.compilation=true -Dkotlin.incremental.compilation.js=true -Dkotlin.daemon.enabled -Dkotlin.daemon.client.ali
08-07
bnormal build process termination: C:\jdk\jdk17\bin\java.exe -Xmx3000m -Djava.awt.headless=true "-Djna.boot.library.path=D:\软件\IntelliJ IDEA 2023.1.7/lib/jna/amd64" -Djna.nosys=true -Djna.noclasspath=true --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -Dpreload.project.path=C:/Users/zhang/IdeaProjects/untitled -Dpreload.config.path=C:/Users/zhang/AppData/Roaming/JetBrains/IntelliJIdea2023.1/options -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Didea.IntToIntBtree.page.size=32768 -Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -Dio.netty.initialSeedUniquifier=3259865032773313314 -Dfile.encoding=UTF-8 -Duser.language=zh -Duser.country=CN -Didea.paths.selector=IntelliJIdea2023.1 "-Didea.home.path=D:/软件/IntelliJ IDEA 2023.1.7" -Didea.config.path=C:/Users/zhang/AppData/Roaming/JetBrains/IntelliJIdea2023.1 -Didea.plugins.path=C:/Users/zhang/AppData/Roaming/JetBrains/IntelliJIdea2023.1/plugins -Djps.log.dir=C:/Users/zhang/AppData/Local/JetBrains/IntelliJIdea2023.1/log/build-log "-Djps.fallback.jdk.home=D:/软件/IntelliJ IDEA 2023.1.7/jbr" -Djps.fallback.jdk.version=17.0.10 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=C:/Users/zhang/AppData/Local/JetBrains/IntelliJIdea2023.1/compile-server/untitled_35d07590/_temp_ -Djps.backward.ref.index.builder=true -Dtmh.instrument.annotations=true -Dtmh.generate.line. java报错
06-06
Abnormal build process termination: C:\Users\lenovo\.jdks\semeru-18.0.2\bin\java.exe -Xmx700m -Djava.awt.headless=true "-Djna.boot.library.path=D:\idea\IntelliJ IDEA 2024.1.3/lib/jna/amd64" -Djna.nosys=true -Djna.noclasspath=true --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -Dpreload.project.path=C:/Users/lenovo/Desktop/ticking_manage-master -Dpreload.config.path=C:/Users/lenovo/AppData/Roaming/JetBrains/IntelliJIdea2024.1/options -Dexternal.project.config=C:\Users\lenovo\AppData\Local\JetBrains\IntelliJIdea2024.1\projects\ticking_manage-master.e072e900\external_build_system -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Didea.IntToIntBtree.page.size=32768 -Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -Dio.netty.initialSeedUniquifier=3130921008766261480 -Dfile.encoding=GBK -Duser.language=zh -Duser.country=CN -Didea.paths.selector=IntelliJIdea2024.1 "-Didea.home.path=D:/idea/IntelliJ IDEA 2024.1.3" -Didea.config.path=C:/Users/lenovo/AppData/Roaming/JetBrains/IntelliJIdea2024.1 -Didea.plugins.path=C:/Users/lenovo/AppData/Roaming/JetBrains/IntelliJIdea2024.1/plugins -Djps.log.dir=C:/Users/lenovo/AppData/Local/JetBrains/IntelliJIdea2024.1/log/build-log "-Djps.fallback.jdk.home=D:/idea/IntelliJ IDEA 2024.1.3/jbr" -Djps.fallback.jdk.version=17.0.11 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=C:/
06-17
构建进程终止异常: C:\javanext\java17\bin\java.exe -Xmx700m -Djava.awt.headless=true "-Djna.boot.library.path=D:\QwQjava\IDEA\IntelliJ IDEA 2024.1.4/lib/jna/amd64" -Djna.nosys=true -Djna.noclasspath=true --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Didea.IntToIntBtree.page.size=32768 -Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -Dio.netty.initialSeedUniquifier=-7025499669800896685 -Dfile.encoding=GBK -Duser.language=zh -Duser.country=CN -Didea.paths.selector=IntelliJIdea2024.1 -Djps.language.bundle=C:/Users/18075/AppData/Roaming/JetBrains/IntelliJIdea2024.1/plugins/zh.241.271/lib/zh.241.271.jar "-Didea.home.path=D:/QwQjava/IDEA/IntelliJ IDEA 2024.1.4" -Didea.config.path=C:/Users/18075/AppData/Roaming/JetBrains/IntelliJIdea2024.1 -Didea.plugins.path=C:/Users/18075/AppData/Roaming/JetBrains/IntelliJIdea2024.1/plugins -Djps.log.dir=C:/Users/18075/AppData/Local/JetBrains/IntelliJIdea2024.1/log/build-log "-Djps.fallback.jdk.home=D:/QwQjava/IDEA/IntelliJ IDEA 2024.1.4/jbr" -Djps.fallback.jdk.version=17.0.11 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=C:/Users/18075/AppData/Local/JetBrains/IntelliJIdea2024.1/compile-server/qwqjava_7aa44e10/_temp_ -Djps.backward.ref.index.builder=true -Djps.backward.ref.index.builder.fs.case.sensitive=false "-Djps.kotlin.home=
06-10
构建进程终止异常: D:\java\bin\java.exe -Xmx700m -Djava.awt.headless=true "-Djna.boot.library.path=E:\idea2025\IntelliJ IDEA 2025.1.4.1/lib/jna/amd64" -Djna.nosys=true -Djna.noclasspath=true --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -Dexternal.project.config=C:\Users\18773\AppData\Local\JetBrains\IntelliJIdea2025.1\projects\sky-take-out.8ea8662e\external_build_system -Dcompile.parallel=true -Drebuild.on.dependency.change=true -Didea.IntToIntBtree.page.size=32768 -Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -Dio.netty.initialSeedUniquifier=8602952881493166062 -Djps.use.dependency.graph=true -Dfile.encoding=UTF-8 -Duser.language=zh -Duser.country=CN -Didea.paths.selector=IntelliJIdea2025.1 "-Djps.language.bundle=E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/localization-zh/lib/localization-zh.jar" "-Didea.home.path=E:/idea2025/IntelliJ IDEA 2025.1.4.1" -Didea.config.path=C:/Users/18773/AppData/Roaming/JetBrains/IntelliJIdea2025.1 -Didea.plugins.path=C:/Users/18773/AppData/Roaming/JetBrains/IntelliJIdea2025.1/plugins -Djps.log.dir=C:\Users\18773\AppData\Local\JetBrains\IntelliJIdea2025.1\log\build-log "-Djps.fallback.jdk.home=E:/idea2025/IntelliJ IDEA 2025.1.4.1/jbr" -Djps.fallback.jdk.version=21.0.7 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=C:/Users/18773/AppData/Local/JetBrains/IntelliJIdea2025.1/compile-server/sky-take-out_57901d57/_temp_ -Djps.backward.ref.index.builder=true -Djps.backward.ref.index.builder.fs.case.sensitive=false -Dcompilation.charts=false "-Djps.kotlin.home=E:\idea2025\IntelliJ IDEA 2025.1.4.1\plugins\Kotlin\kotlinc" -Dkotlin.incremental.compilation=true -Dkotlin.jps.dumb.mode=true -Dkotlin.jps.enable.lookups.in.dumb.mode=true -Dkotlin.incremental.compilation.js=true -Dkotlin.daemon.enabled -Dkotlin.daemon.client.alive.path=C:\Users\18773\AppData\Local\Temp\kotlin-idea-967052185359886275-is-running -Dide.compiler.maven.path.to.home=C:\Users\18773\.m2\repository -Dide.propagate.context=false -Dintellij.platform.log.sync=true -classpath "E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/jps-launcher.jar" org.jetbrains.jps.cmdline.Launcher "E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/jps-builders.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/jps-builders-6.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/jps-javac-extension.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/util-8.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/util_rt.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/platform-loader.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/annotations.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/trove.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/kotlin-metadata.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/protobuf.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/rt/netty-jps.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/jps-model.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/javac2.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/forms_rt.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/util.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/lib-client.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/aether-dependency-resolver.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/maven-resolver-connector-basic.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/maven-resolver-transport-file.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/maven-resolver-transport-http.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/idea_rt.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/JavaEE/lib/jasper-v2-rt.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/Kotlin/lib/jps/kotlin-jps-plugin.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/lib/util-8.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/java/lib/jps/java-compiler-charts-jps.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/javaFX/lib/javaFX-jps.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/javaFX/lib/javaFX-common.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/eclipse/lib/eclipse-jps.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/eclipse/lib/eclipse-common.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/JavaEE/lib/jps/javaee-jps.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/platform-langInjection/lib/java-langInjection-jps.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/Groovy/lib/groovy-jps.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/Groovy/lib/groovy-constants-rt.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/maven/lib/maven-jps.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/gradle-java/lib/gradle-jps.jar;E:/idea2025/IntelliJ IDEA 2025.1.4.1/plugins/JPA/lib/jps/javaee-jpa-jps.jar" org.jetbrains.jps.cmdline.BuildMain 127.0.0.1 50653 3b9f51f4-d566-4608-8a71-7106d7fc79fa C:/Users/18773/AppData/Local/JetBrains/IntelliJIdea2025.1/compile-server Unrecognized option: --add-opens Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
最新发布
08-15
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值