Closed djlegge closed 4 years ago
Please provide a minimal working example to reproduce the problem. Are you using proguard?
Thanks for the quick response !
Double checking everything this morning, flutter run --release
DOES work - the app asks for the camera permissions etc.
The problem is when you build app bundle or apks and install them outside of flutter.
The flutter_barcode_reader example project does the same thing.
flutter build apk
adb install build/app/outputs/apk/release/app-release.apk
... does not work.
It seems I am using proguard as it is the default. Building the apk's or bundle with the --no-shrink
option fixes the problem.
Please try to add -keep class de.mintware.** { *; }
to your proguard rules and tell if it works.
Maybe it's because some methods in the platform code are executed by reflection instead of invoking them directly. This will be probably recognized as "dead code" in the release build.
Yes, that works. I had to create the android/app/proguard-rules.pro file as it didn't exist. I did not myself enable proguard, it's R8 that is enabled by default apparently. Anyway, thanks so much for your help and for this great package library.
Perfect, thanks for the information! I'll check if I can create a proguard-rules.pro file for the package so users don't need to activate it by them self. If it's not possible I'll update the docs!
Hi Using the new version 3.0.0-dev.3 for Android, it works very well in the debug build but if I build an app bundle to test the release build I get "MissingPluginException(No implementation found for method requestCameraPermission on channel de.mintware.barcode_scan)". This happens every time you try a scan. Any ideas ? Thanks...