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.JdbcOdbc...