admin管理员组文章数量:1417070
I can't get Flutter to respect the version of gradle in android/gradle/wrapper/gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle/distributions/gradle-8.10.2-all.zip
Flutter keeps using Gradle 7.2 instead of 8.10
flutter analyze --suggestions
┌───────────────────────────────────────────────────────────────────┐
│ General Info │
│ [✓] App Name: app │
│ [✓] Supported Platforms: android, ios, web, macos, linux, windows │
│ [✓] Is Flutter Package: yes │
│ [✓] Uses Material Design: yes │
│ [✓] Is Plugin: no │
│ [✗] Java/Gradle/Android Gradle Plugin: │
│ Incompatible Java/Gradle versions. │
│ Java Version: 21.0.4, Gradle Version: 7.2 │
│ │
│ See the link below for more information: │
│ .html#java │
│ │
└───────────────────────────────────────────────────────────────────┘
Am I missing some configuration?
I can't get Flutter to respect the version of gradle in android/gradle/wrapper/gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle./distributions/gradle-8.10.2-all.zip
Flutter keeps using Gradle 7.2 instead of 8.10
flutter analyze --suggestions
┌───────────────────────────────────────────────────────────────────┐
│ General Info │
│ [✓] App Name: app │
│ [✓] Supported Platforms: android, ios, web, macos, linux, windows │
│ [✓] Is Flutter Package: yes │
│ [✓] Uses Material Design: yes │
│ [✓] Is Plugin: no │
│ [✗] Java/Gradle/Android Gradle Plugin: │
│ Incompatible Java/Gradle versions. │
│ Java Version: 21.0.4, Gradle Version: 7.2 │
│ │
│ See the link below for more information: │
│ https://docs.gradle./current/userguide/compatibility.html#java │
│ │
└───────────────────────────────────────────────────────────────────┘
Am I missing some configuration?
Share Improve this question asked Feb 2 at 20:19 karjankarjan 1,0161 gold badge11 silver badges19 bronze badges 2- I had some similar issues that I resolved by downgrading Java to 17. – abh Commented Feb 2 at 23:22
- Try to build project (android folder) in Android Studio. It will configure missing things & if get any error, Try to upgrade JAVA. – ankushlokhande Commented Feb 3 at 4:13
1 Answer
Reset to default 0Ok, so what worked in the end was the removal of android folder and regenerating it again. I reverted all git changes so it was identical but this time worked. I don't know where Flutter stores additional data outside of project, but good enough for me.
本文标签: androidFlutter not respecting gradle versionStack Overflow
版权声明:本文标题:android - Flutter not respecting gradle version - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745258107a2650223.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论