You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading the Android Gradle Plugin of the host app to version 8.2.2, flutter run fails with following messages:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_contacts:compileDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
* 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 4s
The build environment is
[✓] Flutter (Channel stable, 3.19.0, on macOS 12.7.3 21H1015 darwin-x64, locale en-CN)
• Flutter version 3.19.0 on channel stable at /Volumes/Lenovo/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision bae5e49bc2 (4 days ago), 2024-02-13 17:46:18 -0800
• Engine revision 04817c99c9
• Dart version 3.3.0
• DevTools version 2.31.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Volumes/Lenovo/Library/Android/sdk
• Platform android-34-ext8, build-tools 34.0.0
• ANDROID_HOME = /Volumes/Lenovo/Library/Android/sdk
• ANDROID_SDK_ROOT = /Volumes/Lenovo/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Volumes/Lenovo/Applications/Xcode14.2/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.13.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
After upgrading the Android Gradle Plugin of the host app to version 8.2.2, flutter run fails with following messages:
The build environment is
[✓] Flutter (Channel stable, 3.19.0, on macOS 12.7.3 21H1015 darwin-x64, locale en-CN)
• Flutter version 3.19.0 on channel stable at /Volumes/Lenovo/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision bae5e49bc2 (4 days ago), 2024-02-13 17:46:18 -0800
• Engine revision 04817c99c9
• Dart version 3.3.0
• DevTools version 2.31.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Volumes/Lenovo/Library/Android/sdk
• Platform android-34-ext8, build-tools 34.0.0
• ANDROID_HOME = /Volumes/Lenovo/Library/Android/sdk
• ANDROID_SDK_ROOT = /Volumes/Lenovo/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Volumes/Lenovo/Applications/Xcode14.2/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.13.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
[✓] VS Code (version 1.86.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.82.0
[✓] Connected device (3 available)
• ScarletWitch (mobile) • ASCARLH001LC1500328 • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-x64 • macOS 12.7.3 21H1015 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 121.0.6167.139
[✓] Network resources
• All expected network resources are available.
Proposed solution:
Add
to android/build.gradle so compileDebugKotlin task will select java 1.8 as its target.
The text was updated successfully, but these errors were encountered: