我有一個問題,並查看了可能的重複問題和答案,我認爲這個問題沒有得到其他人的回答,所以在此處詢問。compile appcompat v7:26. +爲融合位置提供商添加播放服務時出錯
我更新了我的播放服務以利用融合位置提供程序,現在我的gradle中的appcompat顯示錯誤。
因此,我創建了一個新項目,並檢查了新項目上的build.gradle,並且具有完全相同的appcompat,但是我的項目顯示錯誤。
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "au.com.itmobilesupport.sqltwo"
minSdkVersion 17
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.google.android.gms:play-services:11.0.1'
}
其此行是顯示錯誤:
compile 'com.android.support:appcompat-v7:26.+'
但在新項目中的罰款。爲什麼我會收到錯誤?
UPDATE:
如果我刪除這兩條線,則錯誤消失:
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.google.android.gms:play-services:11.0.1'
但我需要他們,所以仍然有錯誤。
看起來只是導致錯誤的com.google.android.gms:play-services行。仍在挖掘解決方案 – timv