buildscript { ext { buildToolsVersion = "36.0.0" minSdkVersion = 24 compileSdkVersion = 36 targetSdkVersion = 36 ndkVersion = "27.1.12297006" kotlinVersion = "2.1.20" // --------------------------------------------------------------- // Pin Google Play Services versions so all libraries use the same // artifact. react-native-geolocation-service defaults to 18.0.0 // but react-native-maps requires 21.x where FusedLocationProvider- // Client is an interface, not a class. Using two different versions // causes IncompatibleClassChangeError and a hard app crash. // --------------------------------------------------------------- googlePlayServicesVersion = "21.3.0" // used by geolocation-service playServicesVersion = "21.3.0" // fallback alias playServicesLocationVersion = "21.3.0" // used by geolocation-service googlePlayServicesLocationVersion = "21.3.0" // used by react-native-maps googlePlayServicesMapsVersion = "19.1.0" googlePlayServicesBaseVersion = "18.5.0" } repositories { google() mavenCentral() } dependencies { classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") } } apply plugin: "com.facebook.react.rootproject" // Force a single version of play-services-location across ALL modules // to prevent IncompatibleClassChangeError at runtime. subprojects { configurations.all { resolutionStrategy { force "com.google.android.gms:play-services-location:21.3.0" } } }