question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Device Crash on Startup

See original GitHub issue
FATAL EXCEPTION: Thread-6
08-10 07:47:38.939 24097 24137 E AndroidRuntime: Process: com.pack, PID: 24097
08-10 07:47:38.939 24097 24137 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
08-10 07:47:38.939 24097 24137 E AndroidRuntime: 	at com.google.android.gms.location.LocationServices.<clinit>(Unknown Source)
08-10 07:47:38.939 24097 24137 E AndroidRuntime: 	at com.google.android.gms.location.LocationServices.getFusedLocationProviderClient(Unknown Source)
08-10 07:47:38.939 24097 24137 E AndroidRuntime: 	at com.agontuk.RNFusedLocation.RNFusedLocationModule.<init>(RNFusedLocationModule.java:96)
08-10 07:47:38.939 24097 24137 E AndroidRuntime: 	at com.agontuk.RNFusedLocation.RNFusedLocationPackage.createNativeModules(RNFusedLocationPackage.java:26)
08-10 07:47:38.939 24097 24137 E AndroidRuntime: 	at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:106)
08-10 07:47:38.939 24097 24137 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1191)
08-10 07:47:38.939 24097 24137 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1161)
08-10 07:47:38.939 24097 24137 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1094)

ANy idea how to solve this? I suspect this is because I am somehow using other versions of the google services library… but i could use some guidance as to why this happens

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

22reactions
inkwariscommented, Dec 13, 2018

this work for me

  1. in root “build.gradle” add below code

ext { googlePlayServicesVersion = “11.0.0” }

  1. in “app/build.gradle”

dependencies { … implementation “com.google.android.gms:play-services-location:16.0.0” // <-- add this line }

2reactions
dmitrizagidulincommented, Feb 20, 2019

This issue was very helpful. I ended up having to combine the solutions from two different comments above, in order to make it work. So, in case anybody (or future me) finds it useful:

Do both:

In top-level build.gradle, define googlePlayServicesVersion and add the resolution strategy:

def googlePlayServicesVersion = '16.0.0'

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        configurations.all {
            resolutionStrategy {
                force "com.google.android.gms:play-services-ads:$googlePlayServicesVersion"
                force "com.google.android.gms:play-services-location:$googlePlayServicesVersion"
            }
        }
        google()
    }
}

And ALSO, in app/build.gradle, add this line to the dependencies:

implementation "com.google.android.gms:play-services-location:16.0.0"
Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Windows 10 Crashes on Startup
Here are sure ways to fix when Windows 10 Crashed on Startup. ... Right-click on the device and click on Update Driver in...
Read more >
[FIXED] Windows 10 Crashing Issues | 2022 - Driver Easy
7 Fixes for Windows 10 Crashing Issues · Fix 1: Update available drivers · Fix 2: Turn off Link State Power Management ·...
Read more >
Android Device Manager crashes at startup
When starting the Android Device Manager, I get the manager window but while it is loading, it encounters an exception: [20-11-09 11:41:45.06] System.IO....
Read more >
Your Phone app crashing at start - Microsoft Community
The "Your Phone" app is crashing at startup. I've tried the... Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode ...
Read more >
Fix an Android device that's restarting or crashing - Google Help
To learn how to restart your phone in safe mode, visit your manufacturer's support site. Step 2: Check if the problem goes away....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found