Flutter-permission-handler: Dont work Permission_handler in release mode

Created on 27 Oct 2020  路  12Comments  路  Source: Baseflow/flutter-permission-handler

馃悰 Bug Report

Expected behavior

that such currently in debug mode works perfectly but at the moment of launching a release the allow_handler is totally without response

Reproduction steps

Build apk
install apk
Freezing

Configuration

image
image

Version: 1.x
permission_handler: ^5.0.1+1

Platform:

  • [ ] :iphone: iOS
  • [x ] :robot: Android

Example :

image

i have this logs in debug mode all execute correctly

but in release mode

nothing returns

Most helpful comment

Any news or suggestions to try?

try to do that in gradle.properties
android.enableR8=true
change to
android.enableR8=false

All 12 comments

I am having the same issue! Everything works in debug mode (android simulator & syncing app too my iPhone) but not when I upload to AppStore.

Same issue here!

help ?

Any news or suggestions to try?

Any news or suggestions to try?

try to do that in gradle.properties
android.enableR8=true
change to
android.enableR8=false

Same problem, works perfectly in debug mode, no response in release mode.

try to do that in gradle.properties
android.enableR8=true
change to
android.enableR8=false

thank you so much!!! I was searching for two days for any possible solutions, and was the only way that worked on my project.

It looks like it's some problem with minification/shrinking/ProGuard.

Solved it with:

minifyEnabled false
useProguard false
shrinkResources false

added to release build type in android/app/build.gradle.

Same issue. Using Visual Studio Code.

android.enableR8=false doesn't work.

I don't use proguard.

Please advise,

this should solve

1- change this in android/gradle.properties
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

2- add this in android/app/build.gradle
buildTypes {
release {
minifyEnabled false
useProguard false
shrinkResources false
}
}

3 - (optional) my versions in android/app/build.gradle
compileSdkVersion 30
minSdkVersion 21
targetSdkVersion 30

4 - version of the package i use
permission_handler: ^5.1.0+2

2- add this in android/app/build.gradle
buildTypes {
release {
minifyEnabled false
useProguard false
shrinkResources false
}
}

work fine Thanks

I tried to reproduce the same issue by running the example app in release mode on a Samsung S20 FE (Android 11), I could not reproduce the issue though, the app didn't freeze. I used the newest version of the plug-in (version: ^6.1.1). Please let us know if the solutions mentioned here above don't work and this is still an issue that occurs. Thanks in advance!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

igoriuz picture igoriuz  路  5Comments

tokyokamera picture tokyokamera  路  4Comments

VOIDCRUSHER picture VOIDCRUSHER  路  3Comments

klaszlo8207 picture klaszlo8207  路  5Comments

yethael picture yethael  路  3Comments