react-native-maps: Android dependency 'com.android.support:support-v4 error
Is this a bug report?
Yes
Have you read the Installation Instructions?
Yes
Environment
“react”: “^16.3.0-alpha.1”, “react-native”: “0.54.4”, “react-native-maps”: “^0.21.0”
Steps to Reproduce
I followed the steps for adding the react native maps to android and I’m getting the following errors and warning when I try to run react-native run-android command.
Android dependency 'com.android.support:support-v4' has different version for the compile (23.0.1) and runtime (25.2.0) classpath. You should manually set the same version via DependencyResolution
Expected Behavior
Run the project
(Write what you thought would happen.)
Actual Behavior
Getting error:

About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15
For it’s working after adding this line in app/build.gradle
implementation “com.android.support:support-v4:27.1.1”
@vikrantnegi
This is what worked for me, edit
android/app/build.gradleand change version into24.0.0Try this:
build.gradileto thisgoogle()in repositories under buildscripts so it looks like thisclasspathclasspath 'com.android.tools.build:gradle:3.1.1'distributionUrlingradle-wrapper.propertiesdistributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zipI also started encountering a similar error when I updates from RN 0.54 -> RN 0.56. The error message however is slightly different:
Conflict with dependency 'com.android.support:support-compat' in project ':react-native-maps'. Resolved versions for compilation (26.1.0) and packageing (25.2.0) differ.Environment “react-native”: “0.56.0”, “react-native-maps”: “https://github.com/react-community/react-native-maps.git#43f46991f4a5b0dc9ddba9214ab17e0230b9321a”
@RajesMca008 in what line exactly do you need to add that?