当我试图在Android中编译我的应用程序时,我对“react原生-地理定位-服务”有一个问题。
Cannot find a version of 'com.android.support:appcompat-v7' that satisfies the version constraints:
Dependency path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.android.support:appcompat-v7:26.1.0'
Constraint path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.android.support:appcompat-v7' strictly '26.1.0' because of the following reason: debugRuntimeClasspath uses version 26.1.0
Dependency path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.android.support:appcompat-v7:26.1.0'
Constraint path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.android.support:appcompat-v7' strictly '26.1.0' because of the following reason: debugRuntimeClasspath uses version 26.1.0
Dependency path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.android.support:appcompat-v7:26.1.0'
Constraint path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.android.support:appcompat-v7' strictly '26.1.0' because of the following reason: debugRuntimeClasspath uses version 26.1.0
Dependency path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.android.support:appcompat-v7:26.1.0'
Constraint path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.android.support:appcompat-v7' strictly '26.1.0' because of the following reason: debugRuntimeClasspath uses version 26.1.0
Dependency path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.android.support:appcompat-v7:26.1.0'
Dependency path 'UnalAR:react-native-geolocation-service:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.android.support:appcompat-v7:27.1.1'我的android/应用程序/build.gradle
dependencies {
compile project(':react-native-simple-compass')
compile project(':react-native-heading')
compile project(':react-native-geolocation-service')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.facebook.react:react-native:+'
implementation project(':arcore_client') // remove this if AR not required
implementation project(':gvr_common')
implementation project(path: ':viro_renderer')
implementation project(path: ':react_viro')
implementation 'com.google.android.exoplayer:exoplayer:2.7.1'
implementation 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'
implementation 'com.amazonaws:aws-android-sdk-core:2.7.7'
implementation 'com.amazonaws:aws-android-sdk-ddb:2.7.7'
implementation 'com.amazonaws:aws-android-sdk-ddb-mapper:2.7.7'
implementation 'com.amazonaws:aws-android-sdk-cognito:2.7.7'
implementation 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.7.7' }我遵循了react本机地理定位-服务文档这里,但是只有当我包含了这个库时才会出现这个错误。
我认为错误在
实现‘com.android.Support:appcompat-v7:28.0’
但我害怕改变它。
谢谢你们帮我伙计们。
发布于 2019-03-10 20:12:02
你是对的。查看该项目的代码,它似乎检查您是否正在重写项目中的版本(当出现这些问题时,许多依赖项开始执行此操作)。因此,进入您的项目build.gradle (而不是app/build.gradle),您可以覆盖库正在使用的版本:
buildscript {
ext {
...
supportLibVersion = "28.0.0"
...
}
}https://stackoverflow.com/questions/55081890
复制相似问题