Repository navigation
Closed
Labels
platform-androidAndroid applications specificallyAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on AndroidtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
The following issue only occurs in release mode.
Logs
[ ] Application running.
[ ] To quit, press "q".
[ +69 ms] E/flutter (32391): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(733)] Could not locate FlutterCallbackInformation class
[ ] F/flutter (32391): [FATAL:flutter/shell/platform/android/library_loader.cc(24)] Check failed: result.
[✓] Flutter (Channel dev, v1.2.0, on Linux, locale en_US.UTF-8)
• Flutter version 1.2.0 at /home/gregor/development/flutter
• Framework revision 06b979c4d5 (6 days ago), 2019-01-25 14:27:35 -0500
• Engine revision 36acd02c94
• Dart version 2.1.1 (build 2.1.1-dev.3.2 f4afaee422)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /home/gregor/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /snap/android-studio/70/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[✓] Android Studio (version 3.2)
• Android Studio at /snap/android-studio/69/android-studio
• Flutter plugin version 31.3.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] Android Studio (version 3.3)
• Android Studio at /snap/android-studio/70/android-studio
• Flutter plugin version 32.0.1
• Dart plugin version 182.5124
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[✓] Connected device (1 available)
• ONEPLUS A3003 • fe20f4e6 • android-arm64 • Android 8.0.0 (API 26)
• No issues found!
Reacted by Alex Rudyk, Karol Lisiewicz, tegkev, Sebastian Roth, Evelina Vrabie, Bruno Calou, mkoorn, António Valente, ECnet, Serhii Chaban and 2 more
Metadata
Metadata
Assignees
Labels
platform-androidAndroid applications specificallyAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on AndroidtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
The-Redhat commentedon Jan 31, 2019
I found out that the reason was Proguard. I used the standard configuration from the docs. Maybe it needs to be updated.
kangwang1988 commentedon Feb 6, 2019
@The-Redhat
A minimal demo project which can reproduce this issue would be helpful.
zoechi commentedon Feb 7, 2019
Might be related to #11099, #21130
The-Redhat commentedon Feb 7, 2019
Steps to reproduce
releasewithpubspec.yamlbattyman commentedon Mar 12, 2019
there must be something wrong with "minifyEnabled true", ahh it looks like cutting down on flutter unnormally
mayer-yu commentedon Apr 4, 2019
You can set minifyEnabled false in your build.gralde.
Or you can add
-keep class io.flutter.** {*;} -dontwarn io.flutter.**
in your proguard-rules.pro
The-Redhat commentedon Apr 7, 2019
Didn't work for me @sbLaughing .
noordawod commentedon Apr 23, 2019
Same problem here, embedding Flutter as a module.
minifyEnabledandshrinkResourcesare both activated, and Flutter's ProGuard rules are inserted properly.The fix suggested by @sbLaughing does not help also. Same result.
The only way that worked was to deactivate both options above.
evelyne24 commentedon Apr 29, 2019
I have the same issue. Is it related to Firebase or Proguard, I can't tell. My project also depends on several Firebase libraries. @noordawod Have you managed to make it work with Proguard?
noordawod commentedon Apr 29, 2019
"The only way that worked was to deactivate both options above." <-- this works only.
Sese-Schneider commentedon May 6, 2019
I had the same issue as soon as I updated my project to the new R8 minifier
insinfo commentedon Jun 15, 2019
I'm having the same problem, I can compile the apk release and run on several phones with no problem, plus when I published it on Google Play it a fatal error and close app
MauroNavaDOS commentedon Jul 17, 2019
I put minifyEnabled (android/app/build.gradle) as false and it worked for me!
biklas7 commentedon Jul 29, 2019
minifyEnabled falsealso works for me.eseidelGoogle commentedon Sep 6, 2019
@collinjackson @blasten is there something simple missing from our proguard rules or instructions on how to use proguard with firebase plugins?
eseidelGoogle commentedon Sep 6, 2019
https://api.flutter.dev/javadoc/io/flutter/view/FlutterCallbackInformation.html is the class in question.
blasten commentedon Sep 6, 2019
That sounds correct! The good news is that this is fixed in master (we still need to update the website) https://github.com/flutter/engine/pull/11893/files
jnaval04 commentedon Oct 3, 2019
@blasten which version of flutter this was added on? This is still an issue for me on 1.9.1+hotfix.4.
zmeggyesi commentedon Nov 12, 2019
@jnaval04 I'm using 1.9.1+hotfix.6 stable, and my solution was to add the following ProGuard rules:
Curiously, the issue only came up when I added Firebase Crashlytics to the project, not before...
kolaente commentedon Jul 5, 2020
I am hitting this with 1.17.5, only in release builds and not using ProGuard.
github-actions commentedon Aug 14, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.