我一直在尝试将flutter_stripe软件包升级到10.0.0版本,它需要gradle 8.0 0r更高.
下面是我调试控制台的样子:
Launching lib\main.dart on 21121119SG in debug mode...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\morsv\Documents\Flutter Projects\book_door\android\app\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
Your current JDK is located in C:\Program Files\Android\Android Studio\jre
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
* 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
BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (1).
字符串
我尝试在IDE设置中更改java版本,尝试将java 17添加到我的环境变量中,并尝试编辑gradle.properties文件,但没有任何工作.我做错了什么吗?(我正在使用vscode btw是否有特殊的方法来更改vscode的jdk?)
1条答案
按热度按时间qv7cva1a1#
正在构建中。gradle
变化
字符串
到
型
尝试更新gradle如果不工作