`Launching lib/flavors/main_dev.dart on sdk gphone arm64 in debug mode…
Warning: This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:google_sign_in_android:compileDebugJavaWithJavac’.
Could not resolve all files for configuration ‘:google_sign_in_android:androidJdkImage’.
Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: /Users/yurtaslanmac/Library/Android/sdk/platforms/android-34/core-for-system-modules.jar.
> Error while executing process /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/jlink with arguments {–module-path /Users/yurtaslanmac/.gradle/caches/transforms-3/75ce9466628e968a28c2d9274c899d53/transformed/output/temp/jmod –add-modules java.base –output /Users/yurtaslanmac/.gradle/caches/transforms-3/75ce9466628e968a28c2d9274c899d53/transformed/output/jdkImage –disable-plugin system-modules}
- 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 10s
Error: Gradle task assembleDevDebug failed with exit code 1
Exited (1).
`
I encountered this problem after updating android studio. None of my apps build in android studio.
flutter doctor --verbose
`[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-arm64, locale en-TR)
• Flutter version 3.24.3 on channel stable at /Users/yurtaslanmac/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (4 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
• Android SDK at /Users/yurtaslanmac/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
• All Android licenses accepted. [✓] Xcode – develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.15.2 [✓] Chrome – develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2024.2)
• 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 21.0.3+-79915917-b509.11) [✓] VS Code (version 1.90.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.98.0 [✓] Connected device (4 available)
• sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 15.0.1 24A348 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.0.1 24A348 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 129.0.6668.90 [✓] Network resources
• All expected network resources are available.
• No issues found!`
How can I fix this problem and build all my apps? Can you please help?
2
Answers
This error is common when the Flutter package is not compatible with Java.
you can go to this file path
C:/Users/yurtaslanmac/.gradle/caches/transforms-3/
and search both id75ce9466628e968a28c2d9274c899d53
and75ce9466628e968a28c2d9274c899d53
Delete both file than again build.I solved a similar problem with opening the project’s android folder as a separate project in Android Studio (Android Studio top left panel -> Open -> android folder in your project -> Click OK), which then prompted me to use the built-in upgrade manager. With that, I upgraded to the latest version of Gradle, and my flutter app was working again.