gpt4 book ai didi

java - Android Studio 上的 Gradle 加载错误

转载 作者:太空狗 更新时间:2023-10-29 15:33:15 29 4
gpt4 key购买 nike

我在 Debian 发行版(32 位)上运行 android studio,每当我启动 android studio 时,我都会遇到 gradle 问题,它一直在加载,在 gradle 窗口中,我得到一长串错误,上面写着:

***Executing tasks: [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]

Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2421Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
AAPT err(Facade for 22453413): /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: 1: /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: Syntax error: Unterminated quoted string
AAPT err(Facade for 7072356): /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: 1: /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: Syntax error: Unterminated quoted string
AAPT err(Facade for 31338389): /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: 1: /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: Syntax error: Unterminated quoted string

Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands

AAPT err(Facade for 17737675): /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: 1: /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: Syntax error: Unterminated quoted string

Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands

AAPT err(Facade for 11417836): /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: 1: /home/user1/android-sdk-linux/build-tools/24.0.2/aapt: Syntax error: Unterminated quoted string
Thread(png-cruncher_5): Broken pipe
java.io.IOException: Broken pipe
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:326)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at com.android.builder.png.AaptProcess.shutdown(AaptProcess.java:143)
at com.android.builder.png.QueuedCruncher$1.destruction(QueuedCruncher.java:144)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:245)
at java.lang.Thread.run(Thread.java:745)
***

此错误的页面和页面重复出现。我该怎么做才能解决这个问题?

最佳答案

通过将 gradle 降级到 23.0.3 修复了它。

http://dl.google.com/android/repository/build-tools_r23.0.3-linux.zip

下载并解压到android-sdk/buildtoolsbuildToolsVersion 替换为“23.0.3”。

它奏效了。

关于java - Android Studio 上的 Gradle 加载错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39773326/

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