flutter-permission-handler icon indicating copy to clipboard operation
flutter-permission-handler copied to clipboard

Dont work Permission_handler in release mode

Open MonsterDKing opened this issue 3 years ago • 12 comments

🐛 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

MonsterDKing avatar Oct 27 '20 09:10 MonsterDKing

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.

ashleymooney123 avatar Oct 27 '20 12:10 ashleymooney123

Same issue here!

kustraslawomir avatar Oct 27 '20 16:10 kustraslawomir

help ?

MonsterDKing avatar Oct 27 '20 21:10 MonsterDKing

Any news or suggestions to try?

ashleymooney123 avatar Nov 03 '20 12:11 ashleymooney123

Any news or suggestions to try?

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

vitoramerico avatar Nov 10 '20 16:11 vitoramerico

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

Eliander avatar Nov 10 '20 17:11 Eliander

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.

jhonantanErnane avatar Nov 12 '20 02:11 jhonantanErnane

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.

ktos avatar Jan 10 '21 19:01 ktos

Same issue. Using Visual Studio Code.

android.enableR8=false doesn't work.

I don't use proguard.

Please advise,

simone40love avatar Jan 18 '21 14:01 simone40love

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

vitoramerico avatar Feb 25 '21 16:02 vitoramerico

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

work fine Thanks

erayhamurlu avatar Mar 23 '21 15:03 erayhamurlu

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!

JDDV avatar Apr 13 '21 13:04 JDDV

Without additional information, we are unfortunately not able to resolve this issue. Therefore, we reluctantly closed this issue for now. If you run into this issue later, feel free to file a new issue with a reference to this issue. Add a description of detailed steps to reproduce, expected and current behaviour, logs and the output of 'flutter doctor -v'. Thanks for your contribution.

github-actions[bot] avatar Sep 06 '23 22:09 github-actions[bot]