I’m having trouble running my Flutter app on Android, and I’m encountering an error during the build process.
This is the error i am facing and i am not able to build my app
Launching libmain.dart on sdk gphone64 x86 64 in debug mode…
Running Gradle task ‘assembleDebug’…
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:path_provider_android:compileDebugJavaWithJavac’.
Could not resolve all files for configuration ‘:path_provider_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: C:UsersshahiAppDataLocalAndroidsdkplatformsandroid-34core-for-system-modules.jar.
> Error while executing process C:Program FilesAndroidAndroid Studiojbrbinjlink.exe with arguments {–module-path C:Usersshahi.gradlecachestransforms-39263d05e7a9236c2cfa2ca39c5a20e5atransformedoutputtempjmod –add-modules java.base –output C:Usersshahi.gradlecachestransforms-39263d05e7a9236c2cfa2ca39c5a20e5atransformedoutputjdkImage –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 22s
Error: Gradle task assembleDebug failed with exit code 1
Yesterday,
i updated my flutter,dart and Android Studio and currently i am using Android Studio LadyBug and i am not able to build my app
I have tried reinstalling android studio,plugins and all the solutions that were previous available such as updating Android Command Line Tools from SDK Manager. I have checked all my environment variables and its all correct. The issue started as i updated my flutter,dart and android studio.
I have tried Flutter clean,flutter pub get etc.
2
Answers
Update com.android.application plugin to version 8.3.2 or latest in settings.gradle file.
If you can’t find this file you can create one at root of Android folder of Flutter project and copy paste below content:
Change to 8.3.2 in
Change to 8.4 or 8.5 in
change Ndkversion to