-
Notifications
You must be signed in to change notification settings - Fork 720
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
Release version works but APK release doesnt work. #481
Comments
@JayadevHaddadi try using |
Add following code to your proguard file.
|
where can i find this file sir? |
log cat:
|
First of all check you Android Grudle version in the android/build.gradle file. Find this line: classpath 'com.android.tools.build:gradle:X.X.X' - Gradle >= 4.0.0 plugin does not work correctly! Change to: Information about Gradle 4.0.0: |
You can create |
@AleksMx have you managed to fix it? |
Yes. It is necessary to downgrade the Gradle plugin version to 3. |
@JayadevHaddadi could you please try the suggested fix? |
Thanks for the prompt help. I changed from 4.0.0 to: `FAILURE: Build failed with an exception.
BUILD FAILED in 2m 49s FAILURE: Build failed with an exception.
The second error I could remove by adding the local.properties file they ask for. In AndroidManifest.xml we find: :( Thanks |
@JayadevHaddadi could you try checking Android X migration guide and see if it works for you afterwards? Likely to be some incompatibility issue related with it. |
The problem has been solved on my side. What I have done:
Note: Under AndroidStudio 4.1 you have to open the Android folder of the project and not the project itself to see the “Sync Project with Gradle Files” tool appear (half an hour to find this)
Problem solved! |
I tried whatever @miguelpruivo said and also @chris-pro. |
@JayadevHaddadi could that be related with something else on your app? Since the app runs anyway. |
The easiest is to re-create an empty flutter project. Then copy the lib folder into it from you old project. What you do can lead to undefined behavior. |
Small correction on my previous post. My application was working fine in debug mode on the emulator but there were some complications when I wanted to do an app-release. The issue was related to Gradle version 4 as reported by @AleksMx. To summarize the changes that fixed the problem: Beforeandroid/app/build.gradle
android/build.gradle
android/gradle/wrapper/gradle-wrapper.properties
Afterandroid/app/build.gradle
android/build.gradle
android/gradle/wrapper/gradle-wrapper.properties
|
@chris-pro |
Thank you for your clear explanation @chris-pro! 👌 Closing as it is now resolved. |
Works like a charm! Thanks)) |
Sorry but this does not work for me, I followed proguard and gradle advices, yet it crashes when users picks pdf on release mode. |
Here is a snippet
|
here is Flutter Doctor
|
PickedFile work on debug mode but not work on release mode Doctor summary (to see all details, run flutter doctor -v): • No issues found! classpath 'com.android.tools.build:gradle:3.5.3' compileSdkVersion 31 |
I'm using latest version of Flutter 1.22.3 and Android Studio 4.1. Flutter doctor has no issues.
Latest version of FilePicker 2.0.11.
When I run the app as debug or release version is fine.
But the APK release when installed crashes immediately. I can not get any reports even when I turn on debuggable for release.
Crash disappears as soon as I disable file_picker.
I appreciate any help.
The text was updated successfully, but these errors were encountered: