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
{{ message }}
Repository navigation
Android Studio updated gradle version of my project and now flutter run fails #9842
I opened my Flutter project in Android Studio to edit some native Android code. Android Studio told me that I should immediately update the gradle version of my project because of important bug fixes (the messages sounded rather urgent). I foolishly clicked "upgrade gradle" and now my project doesn't build with flutter run anymore 😞
C:\src\firebase_messaging\example [master]> flutter run
Running 'flutter packages get'in example... 0.7s
Launching lib/main.dart on Nexus 6P in debug mode...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\src\firebase_messaging\example\android\app\build.gradle' line: 14
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Minimum supported Gradle version is 3.3. Current version is 3.2. If using the gradle wrapper, try editing the distributionUrl in C:\src\firebase_messaging\example\android\gradle\wrapper\gradle-wrapper.properties to gradle-3.3-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error running gradle: Exit code 1 from: C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin\gradle.bat app:properties
Running 'gradle assembleDebug'...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\src\firebase_messaging\example\android\app\build.gradle' line: 14
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Minimum supported Gradle version is 3.3. Current version is 3.2. If using the gradle wrapper, try editing the distributionUrl in C:\src\firebase_messaging\example\android\gradle\wrapper\gradle-wrapper.properties to gradle-3.3-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Gradle build failed: 1
Building and Running from Android Studio still works fine, but I miss that hot reload...
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Add gradle wrapper to new project template.
mit-mit commentedon Jun 9, 2017
While we are working on a real resolution to this problem, the following workaround seems to work:
Install gradle 3.3:
/Applications/Android Studio/Contents/gradle/C:\Program Files\Android\Android Studio\gradleWhen opening in Android Studio, answer prompts like this:
mravn-google commentedon Jun 26, 2017
Closed via #10928.
github-actions commentedon Sep 4, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.