在配置 react-native-maps 中获取 "supportLibVersion" , "playServicesVersion" 和 "androidMapsUtilsVersion" 值
Get "supportLibVersion" , "playServicesVersion" and "androidMapsUtilsVersion" Value in configuration react-native-maps
我正在安装 react-native-maps
。在安装指南中,在第 3.1 节的 Build configuration on Android 上,它显示:
buildscript {
ext {
buildToolsVersion = "xxx"
minSdkVersion = xxx
compileSdkVersion = xxx
targetSdkVersion = xxx
supportLibVersion = "xxx"
playServicesVersion = "xxx" // or set latest version
androidMapsUtilsVersion = "xxx"
}
}
...
如何获取 supportLibVersion
、playServicesVersion
和 androidMapsUtilsVersion
值?
试试这个:
ext {
compileSdkVersion = 28
targetSdkVersion = 28
buildToolsVersion = "28.0.3"
googlePlayServicesVersion = "17.0.0"
supportLibVersion = "27.1.0"
androidMapsUtilsVersion = "0.5+"
minSdkVersion = 16
}
一般来说,所有的库都可以在maven 仓库中找到。对于某些人来说,您必须查看一个具体的库才能获得版本号(这个数字是您在 build.grade 文件中输入的数字)。通常,属于一个组的所有库都应该支持相同的版本号(否则会出现编译错误,您需要检查具体版本并确保它存在于您需要的库中)。
googlePlayServices版本:
https://mvnrepository.com/artifact/com.google.android.gms/play-services-maps
androidMapsUtils版本:
https://mvnrepository.com/artifact/com.google.maps.android/android-maps-utils
supportLibVersion:
https://mvnrepository.com/search?q=com.android.support
在库中查看。例如https://mvnrepository.com/artifact/com.android.support/appcompat-v7
我正在安装 react-native-maps
。在安装指南中,在第 3.1 节的 Build configuration on Android 上,它显示:
buildscript {
ext {
buildToolsVersion = "xxx"
minSdkVersion = xxx
compileSdkVersion = xxx
targetSdkVersion = xxx
supportLibVersion = "xxx"
playServicesVersion = "xxx" // or set latest version
androidMapsUtilsVersion = "xxx"
}
}
...
如何获取 supportLibVersion
、playServicesVersion
和 androidMapsUtilsVersion
值?
试试这个:
ext {
compileSdkVersion = 28
targetSdkVersion = 28
buildToolsVersion = "28.0.3"
googlePlayServicesVersion = "17.0.0"
supportLibVersion = "27.1.0"
androidMapsUtilsVersion = "0.5+"
minSdkVersion = 16
}
一般来说,所有的库都可以在maven 仓库中找到。对于某些人来说,您必须查看一个具体的库才能获得版本号(这个数字是您在 build.grade 文件中输入的数字)。通常,属于一个组的所有库都应该支持相同的版本号(否则会出现编译错误,您需要检查具体版本并确保它存在于您需要的库中)。
googlePlayServices版本:
https://mvnrepository.com/artifact/com.google.android.gms/play-services-maps
androidMapsUtils版本:
https://mvnrepository.com/artifact/com.google.maps.android/android-maps-utils
supportLibVersion:
https://mvnrepository.com/search?q=com.android.support
在库中查看。例如https://mvnrepository.com/artifact/com.android.support/appcompat-v7