Skip to content

Could not locate FlutterCallbackInformation class #27371

Closed

Description

@The-Redhat

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!

Activity

  1. The-Redhat commented on Jan 31, 2019

    @The-Redhat
    ContributorAuthor

    I found out that the reason was Proguard. I used the standard configuration from the docs. Maybe it needs to be updated.

  2. kangwang1988 commented on Feb 6, 2019

    @kangwang1988
    Contributor

    @The-Redhat
    A minimal demo project which can reproduce this issue would be helpful.

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 6, 2019
  4. zoechi commented on Feb 7, 2019

    @zoechi
    Contributor

    Might be related to #11099, #21130

  5. added
    platform-androidAndroid applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Feb 7, 2019
  6. added this to the milestone on Feb 7, 2019
  7. The-Redhat commented on Feb 7, 2019

    @The-Redhat
    ContributorAuthor

    Steps to reproduce

    1. flutter create
    2. Replace buildType release with
                signingConfig signingConfigs.debug
    
                minifyEnabled true
                useProguard true
    
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    1. add proguard-rules.pro file like described in the docs
    2. add following packages to pubspec.yaml
    device_info: ^0.3.0
    package_info: ^0.3.2
    flutter_cache_manager: ^0.3.0-beta.2
    url_launcher: ^3.0.3
    firebase_messaging: 2.1.0
    quick_actions: ^0.2.2
    flutter_custom_tabs: ^0.4.0
    uni_links: ^0.1.4
  8. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 7, 2019
  9. added
    t: gradle"flutter build" and "flutter run" on Android
    on Feb 17, 2019
  10. battyman commented on Mar 12, 2019

    @battyman

    there must be something wrong with "minifyEnabled true", ahh it looks like cutting down on flutter unnormally

  11. mayer-yu commented on Apr 4, 2019

    @mayer-yu

    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

  12. The-Redhat commented on Apr 7, 2019

    @The-Redhat
    ContributorAuthor

    Didn't work for me @sbLaughing .

  13. noordawod commented on Apr 23, 2019

    @noordawod
    Contributor

    Same problem here, embedding Flutter as a module. minifyEnabled and shrinkResources are 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.

  14. evelyne24 commented on Apr 29, 2019

    @evelyne24

    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?

  15. noordawod commented on Apr 29, 2019

    @noordawod
    Contributor

    "The only way that worked was to deactivate both options above." <-- this works only.

  16. Sese-Schneider commented on May 6, 2019

    @Sese-Schneider
    Contributor

    I had the same issue as soon as I updated my project to the new R8 minifier

  17. insinfo commented on Jun 15, 2019

    @insinfo

    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

    D/FirebaseApp(16233): com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
    I/FirebaseInitProvider(16233): FirebaseApp initialization successful
    D/WindowAnimator(  788): Skip setting animation background if there is an exiting window only.
    W/DynamiteModule(16233): Local module descriptor class for com.google.firebase.auth not found.
    I/SurfaceFlinger(  170): id=2703 Removed Mauncher (2/8)
    I/SurfaceFlinger(  170): id=2703 Removed Mauncher (-2/8)
    I/FirebaseAuth(16233): [FirebaseAuth:] Loading module via FirebaseOptions.
    I/FirebaseAuth(16233): [FirebaseAuth:] Preparing to create service connection to gms implementation
    W/linker  (16233): libflutter.so: unused DT entry: type 0x6ffffef5 arg 0x1df34
    I/ResourceExtractor(16233): Resource version mismatch res_timestamp-3-1560633023906
    W/linker  (16233): libflutter.so: unused DT entry: type 0x6ffffffe arg 0x1ded4
    W/linker  (16233): libflutter.so: unused DT entry: type 0x6fffffff arg 0x3
    E/flutter (16233): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(722)] Could not locate FlutterCallbackInformation class
    F/flutter (16233): [FATAL:flutter/shell/platform/android/library_loader.cc(24)] Check failed: result. 
    F/libc    (16233): Fatal signal 6 (SIGABRT), code -6 in tid 16233 (sostras.appjazz)
    I/ResourceExtractor(16233): Extracted baseline resource assets/vm_snapshot_data
    I/FA      (16233): App measurement is starting up, version: 16250
    I/FA      (16233): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
    I/FA      (16233): Faster debug mode event logging enabled. To disable, run:
    I/FA      (16233):   adb shell setprop debug.firebase.analytics.app .none.
    I/DEBUG   (  182): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    I/DEBUG   (  182): Build fingerprint: 'samsung/j1x3gxx/j1x3g:5.1.1/LMY47V/J120HXXU0ARB2:user/release-keys'
    I/DEBUG   (  182): Revision: '4'
    I/DEBUG   (  182): ABI: 'arm'
    I/DEBUG   (  182): pid: 16233, tid: 16233, name: sostras.appjazz  >>> br.gov.rj.riodasostras.appjazz <<<
    I/DEBUG   (  182): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    I/DEBUG   (  182): Abort message: '[FATAL:flutter/shell/platform/android/library_loader.cc(24)] Check failed: result. 
    I/DEBUG   (  182): '
    I/DEBUG   (  182):     r0 00000000  r1 00003f69  r2 00000006  r3 00000000
    I/DEBUG   (  182):     r4 b6fc2e38  r5 00000006  r6 00000058  r7 0000010c
    I/DEBUG   (  182):     r8 b4827800  r9 beab5d80  sl beab5d70  fp b47fca28
    I/DEBUG   (  182):     ip 00003f69  sp beab5a98  lr b6e1b735  pc b6e3f4a0  cpsr 600e0010
    I/DEBUG   (  182): 
    I/DEBUG   (  182): backtrace:
    I/DEBUG   (  182):     #00 pc 0003b4a0  /system/lib/libc.so (tgkill+12)
    I/DEBUG   (  182):     #01 pc 00017731  /system/lib/libc.so (pthread_kill+52)
    I/DEBUG   (  182):     #02 pc 00018347  /system/lib/libc.so (raise+10)
    I/DEBUG   (  182):     #03 pc 00014be1  /system/lib/libc.so (__libc_android_abort+36)
    I/DEBUG   (  182):     #04 pc 00012f70  /system/lib/libc.so (abort+4)
    I/DEBUG   (  182):     #05 pc 00023ea3  /data/app/br.gov.rj.riodasostras.appjazz-1/lib/arm/libflutter.so
    I/DEBUG   (  182):     #06 pc 00018579  /data/app/br.gov.rj.riodasostras.appjazz-1/lib/arm/libflutter.so (JNI_OnLoad+488)
    I/DEBUG   (  182):     #07 pc 001dd261  /system/lib/libart.so (_ZN3art9JavaVMExt17LoadNativeLibraryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_6HandleINS_6mirror11ClassLoaderEEEPS7_+1572)
    I/DEBUG   (  182):     #08 pc 00204211  /system/lib/libart.so (_ZN3artL18Runtime_nativeLoadEP7_JNIEnvP7_jclassP8_jstringP8_jobjectS5_+496)
    I/DEBUG   (  182):     #09 pc 0001a3cd  /system/framework/arm/boot.oat
    
    
    name: appjazz
    description: Aplicativo do Jazz e Blues
    
    # The following defines the version and build number for your application.
    # A version number is three numbers separated by dots, like 1.2.43
    # followed by an optional build number separated by a +.
    # Both the version and the builder number may be overridden in flutter
    # build by specifying --build-name and --build-number, respectively.
    # In Android, build-name is used as versionName while build-number used as versionCode.
    # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
    # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
    # Read more about iOS versioning at
    # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
    version: 6.0.0+6
    
    environment:
      sdk: ">=2.1.0 <3.0.0"
    
    dependencies:
      flutter:
        sdk: flutter
      flutter_localizations:
        sdk: flutter
    
      # The following adds the Cupertino Icons font to your application.
      # Use with the CupertinoIcons class for iOS style icons.
      cupertino_icons: ^0.1.2
      http: ^0.12.0+2
      path_provider: ^0.5.0
      flutter_advanced_networkimage: ^0.4.15
      #flutter_image: 
      #json_annotation: ^2.4.0
      #json_serializable: ^3.0.0
      sqflite: ^1.1.0
      connectivity: ^0.4.3+1
      url_launcher: ^3.0.0 
      #location: ^2.3.5
      #flutter_html_view: 
      flutter_markdown: ^0.2.0
      #simple_permissions: 
      #image_picker: 
      cloud_firestore: ^0.11.0+2
      firebase_auth: ^0.11.1
      google_sign_in: ^4.0.1+3 
      firebase_database: ^3.0.0
      rxdart: ^0.22.0
      flutter_local_notifications: ^0.7.1+1
      webview_flutter: ^0.3.7+1
      auto_size_text: ^2.0.0+2
      flutter_map: ^0.5.3+1
      latlong: ^0.6.1
      queries: ^0.1.12
      firebase_analytics: ^3.0.2
    
      flutter_svg: #^0.13.0+1
         # path: ../flutter_svg
    
    dev_dependencies:
      flutter_test:
        sdk: flutter
    
      intl_translation: ^0.17.1
    
    
    # For information on the generic Dart part of this file, see the
    # following page: https://www.dartlang.org/tools/pub/pubspec
    
    # The following section is specific to Flutter.
    flutter:
    
      # The following line ensures that the Material Icons font is
      # included with your application, so that you can use the icons in
      # the material Icons class.
      uses-material-design: true
    
      # To add assets to your application, add an assets section, like this:
      # assets:
      #  - images/a_dot_burr.jpeg
      #  - images/a_dot_ham.jpeg
    
      # An image asset can refer to one or more resolution-specific "variants", see
      # https://flutter.io/assets-and-images/#resolution-aware.
    
      # For details regarding adding assets from package dependencies, see
      # https://flutter.io/assets-and-images/#from-packages
    
      # To add custom fonts to your application, add a fonts section here,
      # in this "flutter" section. Each entry in this list should have a
      # "family" key with the font family name, and a "fonts" key with a
      # list giving the asset and other descriptors for the font. For
      # example:
      # fonts:
      #   - family: Schyler
      #     fonts:
      #       - asset: fonts/Schyler-Regular.ttf
      #       - asset: fonts/Schyler-Italic.ttf
      #         style: italic
      #   - family: Trajan Pro
      #     fonts:
      #       - asset: fonts/TrajanPro.ttf
      #       - asset: fonts/TrajanPro_Bold.ttf
      #         weight: 700
      #
      # For details regarding fonts from package dependencies,
      # see https://flutter.io/custom-fonts/#from-packages
      assets:
        - assets/logoJazz.png
        - assets/bakground.jpg   
        - assets/fundo1.jpg
        - assets/fundo2.jpg
        - assets/fundo3.jpg     
        - assets/userAvatar.png
        - assets/logo-pmro-2018-cinza.png
        - assets/pmro2018-logo.png
        - assets/termos.txt
        - assets/sobreHeader.jpg
        - assets/backgroundMenu.png
        - assets/wood.jpeg
        - assets/praia.jpeg
        - assets/praia2.jpeg
        - assets/logoSVG.svg
    
      fonts:
         - family: Big Noodle Titling
           fonts:
             - asset: fonts/big_noodle_titling.ttf
         - family: GlosaDisplayW01-Bold
           fonts:
             - asset: fonts/glosa_display_w01_bold.ttf
         - family: BakerieSmoothCondensedMedium
           fonts:
             - asset: fonts/BakerieSmoothCondensed-Medium.otf
         - family: BakerieSmoothBold
           fonts:
             - asset: fonts/BakerieSmooth-Bold.otf
         - family: iconsmind
           fonts:
             - asset: fonts/iconsmind.ttf
    
             
  18. MauroNavaDOS commented on Jul 17, 2019

    @MauroNavaDOS

    I put minifyEnabled (android/app/build.gradle) as false and it worked for me!

  19. biklas7 commented on Jul 29, 2019

    @biklas7

    minifyEnabled false also works for me.

  20. eseidelGoogle commented on Sep 6, 2019

    @eseidelGoogle
    Contributor

    @collinjackson @blasten is there something simple missing from our proguard rules or instructions on how to use proguard with firebase plugins?

  21. blasten commented on Sep 6, 2019

    @blasten

    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

  22. jnaval04 commented on Oct 3, 2019

    @jnaval04

    @blasten which version of flutter this was added on? This is still an issue for me on 1.9.1+hotfix.4.

  23. zmeggyesi commented on Nov 12, 2019

    @zmeggyesi

    @jnaval04 I'm using 1.9.1+hotfix.6 stable, and my solution was to add the following ProGuard rules:

    -keep class io.flutter.** {*;}
    -dontwarn io.flutter.**
    

    Curiously, the issue only came up when I added Firebase Crashlytics to the project, not before...

  24. kolaente commented on Jul 5, 2020

    @kolaente

    I am hitting this with 1.17.5, only in release builds and not using ProGuard.

  25. github-actions commented on Aug 14, 2021

    @github-actions

    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 -v and a minimal reproduction of the issue.

  26. locked as resolved and limited conversation to collaborators on Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on AndroidtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions