3 thoughts on “Crashing on Android

  1. I added this library and got this error on launching the app. It works fine if i remove the react-native-fcm library, but whenever i add both the app crashes. Here is the log of crash :-

    06-04 12:26:06.949 5578-5578/com.yudhaapp E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.yudhaapp, PID: 5578
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
    at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
    at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
    at android.app.ActivityThread.-wrap1(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5417)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.google.android.gms.common.internal.zzbq” on path: DexPathList[[zip file “/data/app/com.yudhaapp-1/base.apk”],nativeLibraryDirectories=[/data/app/com.yudhaapp-1/lib/x86, /data/app/com.yudhaapp-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) 
    at android.app.ActivityThread.installProvider(ActivityThread.java:5153) 
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748) 
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688) 
    at android.app.ActivityThread.-wrap1(ActivityThread.java) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:148) 
    at android.app.ActivityThread.main(ActivityThread.java:5417) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
    Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.common.internal.zzbq
    at java.lang.Class.classForName(Native Method)
    at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
    at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
    … 13 more
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

  2. @sircEUNHO If you still facing crash problem then follow these steps. It worked in my case:

    1. Open the project on Android Studio

    2. On app level build.gradle file use same version on all firebase and gms dependencies.
      dependencies {
      compile project(‘:react-native-device-info’)
      compile project(‘:react-native-fcm’)
      compile fileTree(dir: “libs”, include: [“*.jar”])
      compile “com.android.support:appcompat-v7:23.0.1”
      compile “com.facebook.react:react-native:+”
      compile ‘com.google.firebase:firebase-core:10.0.1’
      compile ‘com.google.firebase:firebase-messaging:10.0.1’
      }

    3. Open build.gradle file of react-native-device-info module

    4. Put the same version of dependency on play-services-gcm
      dependencies {
      def googlePlayServicesVersion = project.hasProperty(‘googlePlayServicesVersion’) ?
      project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION

      compile ‘com.facebook.react:react-native:+’
      compile “com.google.android.gms:play-services-gcm:10.0.1”
      }

    5. Open build.gradle of firebase module you installed. In my case it is react-native-fcm

    6. Repeat the same process (use same version for all firebase dependencies)
      dependencies {
      def googlePlayServicesVersion = project.hasProperty(‘googlePlayServicesVersion’) ? project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION

      compile fileTree(include: [‘*.jar’], dir: ‘libs’)
      compile ‘com.facebook.react:react-native:+’
      compile “com.google.firebase:firebase-core:10.0.1”
      compile “com.google.firebase:firebase-messaging:10.0.1”
      compile ‘me.leolin:ShortcutBadger:1.1.17@aar’
      }

    7. Sync the gradle file and build the project

  3. I was also having the same issue and i simply commented these 3 lines in node_modules/react-native-device-info/android/build.gradle.. It works for me!!!
    Note: I wasn’t using firebase, I was only using react-native-maps & geolocation-location library. Please make sure you have manually linked the library

    if(firebaseIidVersion){
    // implementation “com.google.firebase:firebase-iid:$firebaseIidVersion”
    }else{
    // def iidVersion = safeExtGet(‘googlePlayServicesIidVersion’, safeExtGet(‘googlePlayServicesVersion’, ‘17.0.0’))
    // implementation “com.google.android.gms:play-services-iid:$iidVersion”
    }

Comments are closed.

5 thoughts on “Crashing on Android

  1. I could solve this problem for my use case. In my case, I changed my image component with,
    shouldComponentUpdate() {
    return false;
    }

    and my app is not crashing now. I don’t exactly know what was the root cause of this problem, but definitely my component didn’t need to be re-rendered every time.

  2. Good news!
    I have fixed this finally.
    It’s the JSBridge caused the crash.
    The d prop in Path element is too large after serialized.
    And I had moved the serialize part to java side, and it never throw A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9fa40028 in tid 4388 (mqt_js) again.
    I’ll ship this fix in next version

  3. 4.6.0 has been released.
    And I think it’s time to close this issue now.
    The crash caused by A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0xxxxxxxx in tid xxxx (mqt_js) has been fixed.
    The crash caused by other errors should be posted in other issues.

Comments are closed.

3 thoughts on “Crashing on Android

  1. @sircEUNHO If you still facing crash problem then follow these steps. It worked in my case:

    1. Open the project on Android Studio

    2. On app level build.gradle file use same version on all firebase and gms dependencies.
      dependencies {
      compile project(‘:react-native-device-info’)
      compile project(‘:react-native-fcm’)
      compile fileTree(dir: “libs”, include: [“*.jar”])
      compile “com.android.support:appcompat-v7:23.0.1”
      compile “com.facebook.react:react-native:+”
      compile ‘com.google.firebase:firebase-core:10.0.1’
      compile ‘com.google.firebase:firebase-messaging:10.0.1’
      }

    3. Open build.gradle file of react-native-device-info module

    4. Put the same version of dependency on play-services-gcm
      dependencies {
      def googlePlayServicesVersion = project.hasProperty(‘googlePlayServicesVersion’) ?
      project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION

      compile ‘com.facebook.react:react-native:+’
      compile “com.google.android.gms:play-services-gcm:10.0.1”
      }

    5. Open build.gradle of firebase module you installed. In my case it is react-native-fcm

    6. Repeat the same process (use same version for all firebase dependencies)
      dependencies {
      def googlePlayServicesVersion = project.hasProperty(‘googlePlayServicesVersion’) ? project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION

      compile fileTree(include: [‘*.jar’], dir: ‘libs’)
      compile ‘com.facebook.react:react-native:+’
      compile “com.google.firebase:firebase-core:10.0.1”
      compile “com.google.firebase:firebase-messaging:10.0.1”
      compile ‘me.leolin:ShortcutBadger:1.1.17@aar’
      }

    7. Sync the gradle file and build the project

Comments are closed.

2 thoughts on “Crashing on Android

  1. Good news!
    I have fixed this finally.
    It’s the JSBridge caused the crash.
    The d prop in Path element is too large after serialized.
    And I had moved the serialize part to java side, and it never throw A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9fa40028 in tid 4388 (mqt_js) again.
    I’ll ship this fix in next version

  2. 4.6.0 has been released.
    And I think it’s time to close this issue now.
    The crash caused by A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0xxxxxxxx in tid xxxx (mqt_js) has been fixed.
    The crash caused by other errors should be posted in other issues.

Comments are closed.