Issue
Basically my app run and build on iOS but doesn't on Android anymore after I updated Android studio to 3.5 version and i really need to be able to post a release on the playstore.
I've tried lots of things but nothing works i'm looking forward for someone to give me the solution to my problem ! I'm desperate !
Here is my flutter doctor -v log :
[✓] Flutter (Channel unknown, v1.9.1+hotfix.5, on Mac OS X 10.15 19A602, locale en-FR)
• Flutter version 1.9.1+hotfix.5 at /Users/axel/flutter
• Framework revision 1aedbb1835 (6 days ago), 2019-10-17 08:37:27 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/axel/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 40.2.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.39.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.5.1
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
Solution
you just have to modify the build.gradle in android>app>build.gradle with this :
buildTypes {
release {
signingConfig signingConfigs.release
//minifyEnabled true
//useProguard true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
then you can:
flutter clean
flutter build appbundle --release
Answered By - Wambert Orion
Answer Checked By - Senaida (JavaFixing Volunteer)