我想使用places api(新的)。当我将gradle与最新的places api依赖项同步时,它会给出这个错误。下面是我的代码,如果有人可以看看并告诉我我的版本是否正确并提供帮助我已经3天了,我无法解决问题。
我已经尝试过更改某些版本的 google play services 和 gms 但没有帮助。
这是我的应用级 gradle 文件。
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.app.mapify"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.joooonho:selectableroundedimageview:1.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:12.0.1'
implementation 'com.google.firebase:firebase-database:12.0.1'
implementation 'com.google.maps:google-maps-services:0.2.11'
implementation 'org.slf4j:slf4j-simple:1.7.25'
implementation 'com.squareup.picasso:picasso:2.71828'
// implementation 'com.google.android.gms:play-services-places:12.0.1'
implementation 'com.google.android.libraries.places:places-compat:1.1.0'
// implementation 'com.google.android.libraries.places:places:1.0.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
implementation 'com.firebase:geofire-android:2.1.1'
implementation 'com.firebaseui:firebase-ui-database:2.1.1'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.maps.android:android-maps-utils:0.5+'
implementation 'com.elyeproj.libraries:loaderviewlibrary:1.5.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.github.clans:fab:1.6.4'
implementation 'com.victor:lib:1.0.4'
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.android.support:support-v4:27.1.1'
// implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.firebase:firebase-storage:12.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'
}
apply plugin: 'com.google.gms.google-services'
这是我的项目级 gradle 文件。
buildscript {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}