運行時出現(xiàn)以下錯誤
Execution failed for task ':com.jiayi.Fluoro.FluoroApplication.main()'.
> Process 'command 'C:\Users\littleGabriel\.jdks\openjdk-23.0.1\bin\java.exe'' finished with non-zero exit value 1
* Try:
> 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 full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.12.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 13s
3 actionable tasks: 3 executed
執(zhí)行./gradlew build --warning-mode all
查看具體錯誤:
Welcome to Gradle 8.12.1!
Here are the highlights of this release:
- Enhanced error and warning reporting with the Problems API
- File-system watching support on Alpine Linux
- Build and test Swift 6 libraries and apps
For more details see https://docs.gradle.org/8.12.1/release-notes.html
Settings file 'D:\Java\Fluoro\settings.gradle': line 3
Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Use assignment ('url = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.12.1/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
at settings_eztmocxweyoal283sy9dmbts5$_run_closure1$_closure2$_closure3.doCall$original(D:\Java\Fluoro\settings.gradle:3)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
at settings_eztmocxweyoal283sy9dmbts5$_run_closure1$_closure2.doCall$original(D:\Java\Fluoro\settings.gradle:3)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Settings file 'D:\Java\Fluoro\settings.gradle': line 4
Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Use assignment ('url = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.12.1/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
at settings_eztmocxweyoal283sy9dmbts5$_run_closure1$_closure2$_closure4.doCall$original(D:\Java\Fluoro\settings.gradle:4)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
at settings_eztmocxweyoal283sy9dmbts5$_run_closure1$_closure2.doCall$original(D:\Java\Fluoro\settings.gradle:4)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
> Configure project :
Build file 'D:\Java\Fluoro\build.gradle': line 18
Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Use assignment ('url = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.12.1/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
at build_anefe48letf7m205yk518nb2j$_run_closure2$_closure6.doCall$original(D:\Java\Fluoro\build.gradle:18)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
at build_anefe48letf7m205yk518nb2j$_run_closure2.doCall$original(D:\Java\Fluoro\build.gradle:18)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Build file 'D:\Java\Fluoro\build.gradle': line 19
Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Use assignment ('url = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.12.1/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
at build_anefe48letf7m205yk518nb2j$_run_closure2$_closure7.doCall$original(D:\Java\Fluoro\build.gradle:19)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
at build_anefe48letf7m205yk518nb2j$_run_closure2.doCall$original(D:\Java\Fluoro\build.gradle:19)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
可以看到是格式的問題巍佑,修改setting.gradle
和build.gradle
:
pluginManagement {
repositories {
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
gradlePluginPortal()
}
}
rootProject.name = 'Fluoro'
改為
pluginManagement {
repositories {
maven { url='https://repo.spring.io/milestone' }
maven { url='https://repo.spring.io/snapshot' }
gradlePluginPortal()
}
}
rootProject.name = 'Fluoro'
...
repositories {
mavenCentral()
maven { url='https://repo.spring.io/milestone' }
maven { url='https://repo.spring.io/snapshot' }
}
...
改為
...
repositories {
mavenCentral()
maven { url='https://repo.spring.io/milestone' }
maven { url='https://repo.spring.io/snapshot' }
}
...
完成!