嗨,我是本机反应的新手,遇到以下错误,我共享了Gradle文件的代码,我不知道如何更改react-native-maps支持库。指导我解决此问题
发现错误
C:\ wamp64 \ www \ deliveryApp \ node_modules \ react-native-maps \ lib \ android \ build.gradle: 错误:所有com.android.support库必须使用完全相同的库 版本规范(混合版本可能导致运行时崩溃)。 找到版本25.2.0、23.0.1。例子包括 com.android.support:support-compat:25.2.0和 com.android.support:appcompat-v7:23.0.1 [GradleCompatible]
android / app / build.gradle
android {
compileSdkVersion 24
defaultConfig {
applicationId "com.kobsterDelivery"
minSdkVersion 18
multiDexEnabled = true
targetSdkVersion 24
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile project(':react-native-linear-gradient')
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:+'
// From node_modules
compile(project(':react-native-maps')) {
exclude group: 'com.google.android.gms'
}
compile('com.google.android.gms:play-services-base:10.0.1') {
force = true;
}
compile('com.google.android.gms:play-services-maps:10.0.1') {
force = true;
}
}
android / build.gradle
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
google()
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
ext {
compileSdkVersion = 24
targetSdkVersion = 24
buildToolsVersion = "27.0.3"
supportLibVersion = "24"
googlePlayServicesVersion = "11.8.0"
androidMapsUtilsVersion = "0.5+"
}