gpt4 book ai didi

android - Gradle不适用于android studio 3.0

转载 作者:行者123 更新时间:2023-12-03 05:10:48 24 4
gpt4 key购买 nike

当我尝试使用Android Studio 3.0.1调试Android应用程序时,它生成以下错误:

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
Error:java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.
Information:BUILD FAILED in 6s
Information:2 errors
Information:0 warnings
Information:See complete output in console

有什么想法可以摆脱吗?

Gradle控制台的最后几行显示如下:

:app:mergeDebugResources
Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s

15 actionable tasks: 14 executed, 1 up-to-date

最佳答案

您可以尝试以下方法:

  • 更新gradle,然后
  • 转到-> gradle.wrapper.properties

  • 并将发行版网址替换为:

    distributionUrl=https://services.gradle.org/distributions/gradle-3.4.1-all.zip You can replace "gradle-3.4.1" with the latest version of gradle for android studio.


  • 确保您的插件已更新。
  • 在执行以下步骤时,请确保您的Internet连接正常,以便可以更新gradle和插件。

  • 希望这可以帮助 !

    关于android - Gradle不适用于android studio 3.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47681560/

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