-
-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Compile]: FAILED TO RUN AFTER UPDATING TO ANDROID STUDIO LADY BUG *** CRITICAL #3299
Comments
same issue |
|
thanks @mehrdad1990 , I will try it because when I countered this issue I downgraded my IDE version to latest working one |
what is the Gradle version you use please in |
Getting same issue on MacOS. Downgrading the AndroidStudio did not fix the issue
|
Same problem, but I resolved it with updating AGP version (from 7.3.0): Unfortunately updating to a newer AGP requires some additional tweaks. |
@adham-ashraf77 |
same for me. I am unable to use workaround with updating AGP version because it affects other packages :( |
We have a huge app that use a lot of dependencies, I migrated AGP and all affected packages, I had to fork some myself unfortunately. But know it works. |
Yep, that's the way, but I don't want to fork other packages if there's a chance of a possible fix |
seems working with latest
|
the same issue, all tricks failed |
This worked for me:
|
same issue |
Could not resolve all files for configuration ':connectivity_plus:androidJdkImage'.
same issue |
Fixed issue by using:
Also set in gradle-wrapper.properties:
|
yes this work for me additionally need to set distributionUrl=https://services.gradle.org/distributions/gradle-8.9-all.zip |
Which Java/JDK-Version are you using in your projects for those solutions? |
Thanks to everyone for helping each other fix the compilation issue. I am marking this issue as completed, but I pinned it so it is easier to find. Please do as said by malwinder-s:
|
When doing so, I get the error:
My android parameters inside my
I use Android Studio Ladybug 2024.2.1. |
Do you need to specify the |
I had the same issue, in "gradle-wrapper.properties" raised the version to: and in the "app/build.gradle" put: But now i have another problem, my Release APK doenst have icon anymore and crash on installing... anyone know what is it? [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.4) [√] Android Studio (version 2024.2) [√] VS Code (version 1.94.0) [√] Connected device (4 available) [√] Network resources • No issues found!` Dont have errors on building apk. |
By doing so I got a step further, but my build stills fails:
But this problem seems to be related to pub.dev package "kiosk_mode" not being compatible with newer JDK/Gradle-versions, if I understand the error correctly. |
Created a pinned issue with some more details on how to fix the recent Android compilation issues #3303 |
Same issue how to fix
} include ":app" apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle" distributionBase=GRADLE_USER_HOME |
Solution for Android Studio LadyBug Upgrade IssuesIf you've encountered issues after upgrading to Android Studio LadyBug, here's how you can resolve them:
After making these changes, clean and rebuild your project to ensure everything compiles correctly. |
FAILURE: Build failed with an exception.
BUILD FAILED in 8s |
add this found in docs |
If you dont want to go for this solution what I have applied is added specific JDK version using I have set JDK 11 for my project which was running good on Android Studio Koala. |
It doesn't work for me for this workaround: but finally I figured it out by this command: |
What should I do if the java version is 21. Should I update it to 17 and complete the other steps. |
Had the same issue and this worked -> link |
I have to downgrade Android Studio version to Koala 2024.1.2 Patch 1 and it works. |
Any news, fail in ios |
This works for me |
Dos not work for me in case I want to code native kotlin/java |
I had to downgrade Java to version 17 and change the version in settings.gradle from
to
Now it works without any issues. Important: Don’t forget to adjust the environment variable accordingly. |
Below is the complete steps for updating a Flutter Android app to support the latest Android Gradle Plugin (AGP) with all necessary changes.
|
after changing these - plugins { ------- this shows - Gradle execution is not trusted on this project. android {
} flutter { app/build.gradle file allprojects { this line also shows --- Gradle execution is not trusted on this project. rootProject.buildDir = "../build" tasks.register("clean", Delete) { how can i slove this after upgrading all |
My changes helps me to resolve this problem to use java 21 in my Flutter project: android\settings.gradle
android/app/build.gradle
android\gradle\wrapper\gradle-wrapper.jar
is all changes after upgrade from koala to ladybug. if needed , do not forgot update flutter plugins to last version i.e. device_info_plus: ^11.1.0 if u get warnings about NDK ...
u can add this line or u comment this line like me
|
this works for me. thanks! |
|
This helped me run my project. I will note that I do have warnings when I run my project but it works. I want to add a few more details to help with this.
In your finder/file explorer, go to your flutter project and navigate to your android folder. Open this in Android Studio, otherwise you will not be able to use the AGP Upgrade Assistant. Once you have opened your android folder in AS then you should be able to launch this AGP Upgrade Assistant. |
This answer is wonderful, that help me so much! |
Operating System
Windows 11
Plugin
connectivity_plus
Version
6.0.5
Flutter SDK
Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 2663184aa7 (3 weeks ago) • 2024-09-11 16:27:48 -0500 Engine • revision 36335019a8 Tools • Dart 3.5.3 • DevTools 2.37.3
Compilation command
running the project normally in Android Studio:
flutter run
flutter debug
Dart Dependencies
No response
Native dependencies
No response
Compilation Error
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean
The text was updated successfully, but these errors were encountered: