0

내 Android 애플리케이션에서 Google지도 활동을 사용하는 중에이 오류가 발생합니다.'com.google.android.gms : play-services : 11.8.0'버전의 캐시를 사용할 수 없습니다.

"com.google.android.gms : play-services : 11.8.0을 해결할 수 없습니다."

프로젝트 수준 Gradle을 파일 :

buildscript { 

repositories { 
    jcenter() 
    google() 
} 
dependencies { 
    classpath 'com.android.tools.build:gradle:3.0.1' 

    // NOTE: Do not place your application dependencies here; they belong 
    // in the individual module build.gradle files 
} 
} 
allprojects { 
    repositories { 
     jcenter() 
     google() 
    } 
} 
task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

응용 프로그램 수준 Gradle을 파일 :

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.constraint:constraint-layout:1.0.2' 
    testCompile 'junit:junit:4.12' 
    //noinspection GradleCompatible 
    implementation 'com.android.support:appcompat-v7:26.1.0' 
    implementation 'com.google.android.gms:play-services:11.8.0' 
} 
+0

Android SDK 관리자의 추가 기능인 "Google 리포지토리"도 설치되어 있는지 확인하십시오. –

+0

예, 이미 설치했습니다. –

+0

[Failed To Resolve : com.google.firebase : firebase-firestore : 11.4.2] (https://stackoverflow.com/questions/46569165/failed-to-resolve-com-google- firebasefirebase-firestore11- 4-2) –

답변

9

그래서 결국 나는 그것을 해당 버전 플레이 서비스에 대한 캐시 된 파일을 찾을 수 없습니다 이유 Gradle을 오프라인 모드에 설정 한 대답

을 얻었다.

파일 설정 - 빌드 - 실행 - 배포 - 그 레이드 아래에서 끄고 프로젝트를 다시 동기화하면 일부 파일이 다운로드 된 후 지금 작동합니다.

2

당신은 프로젝트 수준 Gradle을 안쪽이 클래스 경로을 포함해야합니다.

classpath 'com.google.gms:google-services:3.0.0' 

뿐만 아니라 응용 프로그램 수준 build.gradle 내부

.

apply plugin: 'com.google.gms.google-services' 
+0

Erro : 'com.google.gms.google-services'라는 ID가있는 플러그인을 찾을 수 없습니다. –

관련 문제