Starting this morning, my flutter app build on android is failing with
Unsupported Android Plugin version: 3.5.4.
To be clear, it has been building fine for months. No changes to build files only the code. And suddenly this error appears.
Anyone know why and have any solutions?
Solutions tried:
- Updating gradle to 4.1.0, results in
flutter build apk
no longer building the apk, or, if it does,url_launcher
starts throwingMissingPluginException
. - Run
flutter clean
andflutter pub cache repair
CodePudding user response:
It's known that if you upgraded your Flutter version to 2.5.0 and if an error ocurred during upgrade could lead to some dependencies deleted. (Many of my friends and I had suffered from this bug). If that it's not your case, try to invalidate cache and restart or re-download the dependencies from the Internet. Or upgrade the gradle and the flutter version.
CodePudding user response:
If you encounter such an error in your project, what fixed it for me was changing jcenter()
to mavenCentral()
in android/build.gradle
repositories {
google()
mavenCentral()
}
After believing this was the solution, the release build starting failing again with the same error. I managed to nail it down to in the android/app/build.gradle
buildTypes {
release {
...
debuggable true // this was causing the error
...
}
}
Link to Git Issue