gpt4 book ai didi

android - 找不到满足版本限制的 'com.android.support:appcompat-v7' 版本

转载 作者:行者123 更新时间:2023-11-29 23:17:24 30 4
gpt4 key购买 nike

当我试图在 Android Studio 中编译我的应用程序时,我遇到了“react-native-geolocation-service”的问题。

  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/app/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-native-geolocation-service 文档 here ,但仅当我包含此库时才会出现此错误。

我认为错误在

implementation 'com.android.support:appcompat-v7:28.0.0'

但我不敢改变它。

谢谢大家的帮助。

最佳答案

你是对的。查看该项目的代码,它似乎会检查您是否正在覆盖项目中的版本(出现这些问题时,许多依赖项开始这样做)。所以进入你的项目 build.gradle(不是 app/build.gradle),你可以覆盖库正在使用的版本:

buildscript {
ext {
...
supportLibVersion = "28.0.0"
...
}
}

关于android - 找不到满足版本限制的 'com.android.support:appcompat-v7' 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55081890/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com