我想在我的android应用程序中设置新的依赖项。一切正常,直到我添加:implementation 'com.google.android.libraries.places:places:1.1.0'
。
我不知道该如何解决此场所依赖性,而又不破坏其他依赖性。我尝试使用较小的版本,但是没有用。
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://dl.bintray.com/mousebirdconsulting/WhirlyGlobe/"
mavenCentral()
}
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.dissertation"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.android.gms:play-services-appinvite:16.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.libraries.places:places:1.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.firebaseui:firebase-ui-database:4.2.0'
implementation 'com.firebaseui:firebase-ui-storage:4.2.0'
implementation 'com.mousebirdconsulting.maply:Android:2.5'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.karumi:dexter:5.0.0'
implementation 'com.github.mancj:MaterialSearchBar:0.8.1'
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by library will be unknown.
Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.2.0.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-core@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-maps@15.0.1
-- Project 'app' depends onto com.google.firebase:firebase-common@16.0.2
-- Project 'app' depends onto com.google.android.gms:play-services-basement@16.2.0
-- Project 'app' depends onto com.google.firebase:firebase-auth-interop@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-phenotype@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-storage@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-location@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-analytics@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-analytics-impl@16.1.1
-- Project 'app' depends onto com.firebaseui:firebase-ui-database@4.2.0
-- Project 'app' depends onto com.google.android.gms:play-services-stats@15.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-clearcut@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-storage@16.0.2
-- Project 'app' depends onto com.firebaseui:firebase-ui-storage@4.2.0
-- Project 'app' depends onto com.google.android.gms:play-services-appinvite@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector-impl@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-ads-identifier@15.0.1
-- Project 'app' depends onto com.google.firebase:firebase-iid@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-places-placereport@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-flags@15.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-maps@16.1.0
-- Project 'app' depends onto com.google.firebase:firebase-database@16.0.2
-- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-base@16.1.0
-- Project 'app' depends onto com.google.firebase:firebase-dynamic-links@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-auth@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-database-collection@15.0.1
-- Project 'app' depends onto com.google.firebase:firebase-database@16.0.1
-- Project 'app' depends onto com.google.android.libraries.places:places@1.1.0
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
您能推荐我如何解决此错误消息吗?
答案 0 :(得分:0)
这些地方取决于sdk地图,它的版本比常规版本小。放置地图当前版本:“ com.google.android.gms:play-services-maps:16.1.0”。
答案 1 :(得分:0)
这对我有帮助:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.android.gms:play-services-base:16.0.1'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.libraries.places:places:1.1.0'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-auth:17.0.0'
implementation 'com.google.firebase:firebase-database:17.0.0'
implementation 'com.firebaseui:firebase-ui-database:5.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.mousebirdconsulting.maply:Android:2.5'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.karumi:dexter:5.0.0'
implementation 'com.github.mancj:MaterialSearchBar:0.8.1'
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}