Tôi đang nâng cấp Android Studio, Gradle phiên bản 2.3 lên 2.3.3, cũng đã cập nhật sdk - API cấp 26, công cụ xây dựng SDK của tôi 26, Google play Service 41, Google Repository 54.Không thể giải quyết: com.google.firebase: firebase-storage-common: 11.0.1
Khi tôi làm sạch dự án của tôi, tôi nhận được lỗi này: Failed to resolve: com.google.firebase:firebase-storage-common:11.0.1
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.0'
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
multiDexEnabled = true
}
def applicationVersion = '1.524 20170612'
dexOptions {
preDexLibraries = false
javaMaxHeapSize "2g"
}
...
useLibrary 'org.apache.http.legacy'
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'build.gradle'
exclude 'build.xml'
exclude 'META-INF/jersey-module-version'
exclude 'META-INF/NOTICE'
}
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}
}
dependencies {
compile 'com.fasterxml.jackson.core:jackson-core:2.9.0.pr1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.0.pr1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.0.pr1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:11.0.1'
compile 'com.google.android.gms:play-services-base:11.0.1'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.google.android.gms:play-services-contextmanager:9.4.0'
compile 'com.google.android.gms:play-services-places:11.0.1'
compile 'com.google.android.gms:play-services-nearby:11.0.1'
compile 'com.google.android.gms:play-services-maps:11.0.1'
compile 'com.google.android.gms:play-services-ads:11.0.1'
compile 'com.google.android.gms:play-services-auth:11.0.1'
compile 'com.google.android.gms:play-services-gcm:11.0.1'
compile 'com.google.android.gms:play-services-analytics:11.0.1'
compile 'com.google.android.gms:play-services-location:11.0.1'
compile 'com.google.maps.android:android-maps-utils:0.4'
compile 'com.google.zxing:core:3.2.0'
compile 'com.journeyapps:zxing-android-embedded:[email protected]'
compile 'com.google.firebase:firebase-messaging:11.0.1'
compile 'com.google.firebase:firebase-core:11.0.1'
compile 'com.google.firebase:firebase-analytics:11.0.1'
compile 'com.flurry.android:analytics:6.4.2'
compile 'com.android.support.constraint:constraint-layout:+'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Tham khảo rõ ràng tại đây, https://firebase.google.com/docs/android/setup. Tôi đã làm việc tốt với những dòng này các phụ thuộc { ..... biên dịch 'com.google.firebase: firebase-messaging: 9.6.0' biên dịch 'com.google.firebase: firebase-storage-common: 9.6. 0 ' testCompile' junit: junit: 4.12 ' } áp dụng plugin:' com.google.gms.google-services '// dưới cùng của tệp – Nandha
Cảm ơn Nandha đã trả lời câu hỏi của tôi. Đã thử nó, nhưng lỗi không được giải quyết. –