gpt4 book ai didi

android - 无法在新安装的 Android Studio 中构建或清理裸露的单一 Activity 项目

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:02:22 25 4
gpt4 key购买 nike

我最近在我的 Ubuntu 14.04 LTS 上安装了最新的稳定版 Android Studio。 SDK 已正确配置。

我从空白的 Activity 模板创建了一个“Activity”项目,并且未对其进行任何更改。

尝试构建或清理时,我偶尔得到以下信息:

Failed to complete Gradle execution.

Cause:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

那个seemscaused按 VM 的堆大小。但添加 XX:MaxPermSize=1024m 只会减少它出现的次数,这意味着,有时我没有得到这个错误,没有改变任何东西。所以要么它不是真正的解决方案,要么 1024m 不够(这似乎不对..)

但是,当我没有收到此错误时,构建仍然失败:

Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
/home/a/Android/Sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
/home/a/Android/Sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
/home/a/Android/Sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
/home/a/Android/Sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
:app:mergeDebugResources FAILED
/home/a/AndroidStudioProjects/useless/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Error:Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/a/Android/Sdk/build-tools/19.1.0/aapt'' finished with non-zero exit value 127
Error:Execution failed for task ':app:mergeDebugResources'.
> /home/a/AndroidStudioProjects/useless/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/a/Android/Sdk/build-tools/19.1.0/aapt'' finished with non-zero exit value 127
Information:BUILD FAILED
Information:Total time: 13.341 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console

女巫并没有真正提供信息。

最佳答案

好吧,奇怪的是可能this 解决了问题(第二个)。这很奇怪,因为没有办法从 gradle outout 中理解它。

关于android - 无法在新安装的 Android Studio 中构建或清理裸露的单一 Activity 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28912618/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com