Closed shivjeet-git closed 5 years ago
Thanks for the report, would you mind sharing the stacktrace of the crash from logcat?
How can I get that ? By using adb logcat from /android directory ?
It keeps on printing.
Just the stacktrace of the crash is needed, not the whole log output thanks
Can you please help me how can I get that or from where ?
Logcat is correct, but you can just paste the error that shows up when the crash occurs instead of the full output.
Just a guess but I suspect this is due to conflicting Google play services versions from the two SDKs since the Ad ID API was moved to a separate package in new versions. Does declaring a dependency on Google play services ads in your app build.gradle
help:
implementation "com.google.android.gms:play-services-ads:16.0.0"
I tried adding above..still the same result....Build is successful just app keeps stopping.
Please find below the error that came up when app crashes:
12-26 14:19:02.790 1773 1996 D EGL_emulation: eglMakeCurrent: 0xe2629d80: ver 3 1 (tinfo 0xe262cdf0) 12-26 14:19:02.796 1440 1440 D : HostConnection::get() New Host Connection established 0xebe23900, tid 1440 12-26 14:19:02.796 1773 1996 D EGL_emulation: eglMakeCurrent: 0xe2629d80: ver 3 1 (tinfo 0xe262cdf0) 12-26 14:19:02.802 1439 1498 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 8298496 12-26 14:19:02.805 1773 1786 W asset : Asset path /data/app/com.flowersdelivery-aGw1KWtHfJuiFGCZqE6Q5A==/base.apk is neither a directory nor file (type=1). 12-26 14:19:02.805 1773 1786 E ResourcesManager: failed to add asset path /data/app/com.flowersdelivery-aGw1KWtHfJuiFGCZqE6Q5A==/base.apk 12-26 14:19:02.805 1773 1786 W PackageManager: Failure retrieving resources for com.flowersdelivery 12-26 14:19:02.805 1773 1786 W asset : Asset path /data/app/com.flowersdelivery-aGw1KWtHfJuiFGCZqE6Q5A==/base.apk is neither a directory nor file (type=1). 12-26 14:19:02.805 1773 1786 E ResourcesManager: failed to add asset path /data/app/com.flowersdelivery-aGw1KWtHfJuiFGCZqE6Q5A==/base.apk 12-26 14:19:02.805 1773 1786 W PackageManager: Failure retrieving resources for com.flowersdelivery 12-26 14:19:02.805 1773 1786 W asset : Asset path /data/app/com.flowersdelivery-aGw1KWtHfJuiFGCZqE6Q5A==/base.apk is neither a directory nor file (type=1). 12-26 14:19:02.805 1773 1786 E ResourcesManager: failed to add asset path /data/app/com.flowersdelivery-aGw1KWtHfJuiFGCZqE6Q5A==/base.apk 12-26 14:19:02.805 1773 1786 W PackageManager: Failure retrieving resources for com.flowersdelivery 12-26 14:19:02.816 1773 1996 D EGL_emulation: eglMakeCurrent: 0xe2629d80: ver 3 1 (tinfo 0xe262cdf0) 12-26 14:19:02.816 1439 1498 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 8298496 12-26 14:19:02.827 1439 1498 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 8298496 12-26 14:19:02.845 1773 1786 D : HostConnection::get() New Host Connection established 0xca1cb480, tid 1786 12-26 14:19:02.848 2151 2537 W GCoreFlp: No location to return for getLastLocation() 12-26 14:19:02.859 2205 2332 D EGL_emulation: eglMakeCurrent: 0xcec75880: ver 3 1 (tinfo 0xcec779d0) 12-26 14:19:02.862 1773 1790 D : HostConnection::get() New Host Connection established 0xe2823b00, tid 1790 12-26 14:19:02.890 1440 1440 D gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread) 12-26 14:19:02.890 1440 1440 D : HostConnection::get() New Host Connection established 0xebe23900, tid 1440 12-26 14:19:02.891 1440 1440 D gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread) 12-26 14:19:02.898 1440 1440 D : HostConnection::get() New Host Connection established 0xebe23900, tid 1440 12-26 14:19:02.900 1440 1440 D gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread) 12-26 14:19:02.901 1440 1440 D : HostConnection::get() New Host Connection established 0xebe23900, tid 1440 12-26 14:19:02.901 1440 1440 D gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread) 12-26 14:19:02.915 1440 1440 D : HostConnection::get() New Host Connection established 0xebe23900, tid 1440 12-26 14:19:02.953 2382 2865 I Icing : Indexing com.google.android.gms-apps from com.google.android.gms 12-26 14:19:03.062 2382 2865 I Icing : Indexing done com.google.android.gms-apps 12-26 14:19:03.068 2382 2865 I Icing : Indexing com.google.android.gms-internal.3p:MobileApplication from com.google.android.gms 12-26 14:19:03.076 1657 1705 D gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread) 12-26 14:19:03.077 1657 1705 D : HostConnection::get() New Host Connection established 0xcbb71740, tid 1705 12-26 14:19:03.078 1657 1705 D gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread) 12-26 14:19:03.103 2382 2865 I Icing : Indexing done com.google.android.gms-internal.3p:MobileApplication 12-26 14:19:03.113 2382 2865 I Icing : Indexing com.google.android.gms-apps from com.google.android.gms 12-26 14:19:03.116 2382 2865 I Icing : Indexing done com.google.android.gms-apps 12-26 14:19:03.357 2205 2332 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer... 12-26 14:19:05.455 2151 4027 W ctxmgr : [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10013):IndoorOutdoorProducer, vrsn=13280000, 0, 3pPkg = null , 3pMdlId = null , pid = 2151). Was: 3 for 57, account#-517948760# 12-26 14:19:10.455 2151 4118 W ctxmgr : [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10013):IndoorOutdoorProducer, vrsn=13280000, 0, 3pPkg = null , 3pMdlId = null , pid = 2151). Was: 3 for 57, account#-517948760# 12-26 14:19:11.083 1657 1675 E BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0} 12-26 14:19:12.907 1657 1672 W ActivityManager: Activity destroy timeout for ActivityRecord{8d3972c u0 com.flowersdelivery/.MainActivity t179 f} 12-26 14:19:15.458 2151 4004 W ctxmgr : [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10013):IndoorOutdoorProducer, vrsn=13280000, 0, 3pPkg = null , 3pMdlId = null , pid = 2151). Was: 3 for 57, account#-517948760# 12-26 14:19:20.459 2151 4004 W ctxmgr : [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10013):IndoorOutdoorProducer, vrsn=13280000, 0, 3pPkg = null , 3pMdlId = null , pid = 2151). Was: 3 for 57, account#-517948760# 12-26 14:19:25.473 2151 4027 W ctxmgr : [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10013):IndoorOutdoorProducer, vrsn=13280000, 0, 3pPkg = null , 3pMdlId = null , pid = 2151). Was: 3 for 57, account#-517948760# 12-26 14:19:30.480 2151 4123 W ctxmgr : [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10013):IndoorOutdoorProducer, vrsn=13280000, 0, 3pPkg = null , 3pMdlId = null , pid = 2151). Was: 3 for 57, account#-517948760# 12-26 14:19:31.672 1657 1671 E memtrack: Couldn't load memtrack module 12-26 14:19:31.672 1657 1671 W android.os.Debug: failed to get memory consumption info: -1 12-26 14:19:33.851 1440 1461 D hwcomposer: hw_composer sent 342 syncs in 60s
There doesn't seem to be any crash in the above logs, this is odd.
Mismatched Google play services can sometimes cause runtime crashes while still compiling. Would you mind running ./gradlew app:dependencies
and sharing what versions of Google play services libs are being used?
Also, it may help to filter your logcat output to just errors with adb logcat *:E
Does manually matching location version help?
implementation 'com.google.android.gms:play-services-location:16.0.0
After doing adb logcat *.E
I get the log below(if that helps):
2-26 14:36:05.904 1661 1675 E memtrack: Couldn't load memtrack module
12-26 14:36:08.194 1661 1675 E memtrack: Couldn't load memtrack module
12-26 14:36:12.555 3539 3539 E asset : setgid: Operation not permitted
12-26 14:36:12.791 3541 3548 E zygote : Failed writing handshake bytes (-1 of 14): Broken pipe
12-26 14:36:14.314 1530 1716 E : Couldn't opendir /data/app/vmdl1496087814.tmp: No such file or directory
12-26 14:36:14.314 1530 1716 E installd: Failed to delete /data/app/vmdl1496087814.tmp: No such file or directory
12-26 14:36:15.033 3604 3604 E AndroidRuntime: FATAL EXCEPTION: main
12-26 14:36:15.033 3604 3604 E AndroidRuntime: Process: com.flowersdelivery, PID: 3604
12-26 14:36:15.033 3604 3604 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
12-26 14:36:15.033 3604 3604 E AndroidRuntime: at com.google.android.gms.location.LocationServices.
No, it results in same
below is what i have in dependencies dependencies { compile project(':react-native-push-notification') compile project(':react-native-radar') compile project(':react-native-gesture-handler') implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" implementation 'io.radar:sdk:2.1.+' implementation "com.facebook.react:react-native:+" // From node_modules implementation 'com.google.android.gms:play-services-location:16.0.0' }
This looks like the same issue as https://github.com/radarlabs/react-native-radar/issues/40
Does that resolve your crash?
No. I added these compile 'com.google.android.gms:play-services-maps:16.0.0' compile 'com.google.android.gms:play-services-location:16.0.0'
But no luck still crashing
Hm that's very odd, is it possible you're not re-compiling the app before running? This would mean the newly declared dependencies are not being pulled in
I'm uninstalling the app from the simulator. Then I'm doing .gradlew clean and then react-native run-android
Let me know if you want me to try something else or I'm missing something.
That should be sufficient. Would you mind also adding the ads dependency as well, just in case haha.
By ads dependency you mean : implementation "com.google.android.gms:play-services-ads:16 ?
Giving me this error after adding. Am i missing something ?
Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not find com.google.android.gms:play-services-ads:16. Searched in the following locations: file:/C:/Users/shivj/AppData/Local/Android/Sdk/extras/m2repository/com/google/android/gms/play-services-ads/16/play-services-ads-16.pom file:/C:/Users/shivj/AppData/Local/Android/Sdk/extras/m2repository/com/google/android/gms/play-services-ads/16/play-services-ads-16.jar file:/C:/Users/shivj/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-ads/16/play-services-ads-16.pom file:/C:/Users/shivj/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-ads/16/play-services-ads-16.jar file:/C:/Users/shivj/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/16/play-services-ads-16.pom file:/C:/Users/shivj/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/16/play-services-ads-16.jar file:/C:/Users/shivj/.m2/repository/com/google/android/gms/play-services-ads/16/play-services-ads-16.pom file:/C:/Users/shivj/.m2/repository/com/google/android/gms/play-services-ads/16/play-services-ads-16.jar https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-ads/16/play-services-ads-16.pom https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-ads/16/play-services-ads-16.jar https://jcenter.bintray.com/com/google/android/gms/play-services-ads/16/play-services-ads-16.pom https://jcenter.bintray.com/com/google/android/gms/play-services-ads/16/play-services-ads-16.jar file:/E:/Projects/s/node_modules/react-native/android/com/google/android/gms/play-services-ads/16/play-services-ads-16.pom file:/E:/Projects/s/node_modules/react-native/android/com/google/android/gms/play-services-ads/16/play-services-ads-16.jar Required by: project :app
You'll need the full version name:
implementation "com.google.android.gms:play-services-ads:16.0.0"
If you create a fresh project and then install these two packages below https://github.com/zo0r/react-native-push-notification https://github.com/radarlabs/react-native-radar
and the linking both of them with react-native link You don't have to write a single line and it crashes and show the alert of app has stopped.
App started now...with both the packages after adding implementation "com.google.android.gms:play-services-ads:16.0.0"
So what was the issue exactly ?
There were just incompatible versions of Google play services, the other library was pulling in a higher version so we just needed to force location to use that version too. However, 16.0.0 version of location removed the Ads package to a separate module so that's why you need to include both
Thank you for the help!!!
Of course! Please reach out if you have any other issues.
Describe the bug I'm not able to use React Native Push Notifications or React Native Firebase with Radar. As soon as I install Radar apps keeps on crashing. SOme conflict in between these apps maybe.
To Reproduce Steps to reproduce the behavior:
Expected behavior Both apps should work together without crashing the app. Both are working separately but not together.
Metadata (please complete the following information):