0

I am trying to integrate react-native-device-info into my project and when I install the module and link it an error comes up like this

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.google.android.gms:play-services-base' has different version for the compile (15.0.1) and runtime (16.0.1) classpath. You should manually set the same version via DependencyResolution
    
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
* Get more help at https://help.gradle.org
    
BUILD FAILED in 6s
13 actionable tasks: 1 executed, 12 up-to-date

When I configure the project manually same error comes up. But when I unlink react native device info, the project runs well.

1 Answer 1

1

Add this block in your app/build.gradle file below buildTypes{} block and run the app again

configurations.all {
    resolutionStrategy {
           force 'com.google.android.gms:play-services-base:16.0.1'
    }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.