微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Gradle 同步不起作用:无法调试代码

如何解决Gradle 同步不起作用:无法调试代码

我在 IntelliJ 中遇到了 Gradle 问题。 Gradle 完成同步后我得到了这个 -

Task :prepareKotlinBuildScriptModel UP-TO-DATE Deprecated Gradle features were used in this build,making it incompatible with Gradle 8.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 2m 30s

我的build.gradle依赖

dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

gradlew-wrapper.properties

#Fri Apr 30 08:44:08 EAT 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

gradlew -- warning-mode all 输出

Welcome to Gradle 7.0!

Here are the highlights of this release:
 - File system watching enabled by default
 - Support for running with and building Java 16 projects
 - Native support for Apple Silicon processors
 - Dependency catalog feature preview

For more details see https://docs.gradle.org/7.0/release-notes.html

Starting a Gradle Daemon,1 incompatible Daemon Could not be reused,use --statu
s for details

FAILURE: Build Failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example,an unrecognized jvm option is used.
Please refer to the User Manual chapter on the daemon at https://docs.gradle.org
/7.0/userguide/gradle_daemon.html
Process command line: C:\Program Files (x86)\Java\jre1.8.0_261\bin\java.exe -Xmx
1536m -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.v
ariant -cp C:\Users\USER\.gradle\wrapper\dists\gradle-7.0-all\9m115ut5nwvtxli7ny
s8pggfr\gradle-7.0\lib\gradle-launcher-7.0.jar org.gradle.launcher.daemon.bootst
rap.GradleDaemon 7.0
Please read the following process output to find out more:
-----------------------
Error occurred during initialization Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get mR- Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get f
ull insights.

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

我希望能够调试和运行我的代码

请帮忙

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?