IT

play-services-basement.aar를 찾을 수 없습니다

lottoking 2020. 6. 12. 08:23
반응형

play-services-basement.aar를 찾을 수 없습니다


어제 앱을 만들려고했는데 모든 것이 잘 작동했습니다.

오늘, 프로젝트를 변경하지 않고 ... 갑자기 갑자기이 경고 메시지가 나타납니다.

Error:Could not find play-services-basement.aar (com.google.android.gms:play-services-basement:11.0.1). 
Searched in the following locations:
    https://jcenter.bintray.com/com/google/android/gms/play-services-basement/11.0.1/play-services-basement-11.0.1.aar

같은 종류의 문제가 발생하는 사람이 있습니까?

패키지를 검색하는 링크를 따라 가면 기본적으로 브라우저를 통해 즉시 다운로드됩니다. 서버 측에서 무언가가 변경되었다고 가정합니까? 아마도 명명 규칙이 있습니까?

찾고있는 것 같습니다 : play-services-basement.aar 대신 play-services-basement-11.0.1.aar? 이것이 명명 규칙이나 gradle 문제 일 수 있습니까?


jcenter ()에는 원래 google () 또는 maven () 리포지토리를 통해 사용할 수있는 일부 라이브러리의 미러가 있습니다 (의도적으로 수행하고 있다고 생각합니다). gradle 빌드가 작동 할 때 프로젝트에서 사용되는 모든 라이브러리의 첫 번째 위치 repositories {..는 jcenter () 미러에 릴리스가없는 경우 (예 : com.google.android.gms : play -services-ads : 15.0.1 내 경우) 귀하의 gradle이 찾고있는 경우 빌드가 이러한 오류로 실패합니다.

따라서 다음과 같이 jcenter ()를 마지막 repositories {..부분에 나열해야 합니다.

   buildscript {
    ext.kotlin_version = '1.2.50'
    repositories {
        google()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        jcenter()
    }...

  allprojects {
    repositories {
        google()
        jcenter()
    }
  }

이건 미친 짓이야 !!! 나는 같은 문제에 직면했다. 빌드가 제대로 작동하고 갑자기 같은 문제로 실패하기 시작했습니다. 위의 제안을 시도했지만 효과가 없었습니다. 마지막으로 이것이 나를 위해 일한 것입니다.

최신 Firebase 종속성으로 업데이트 :

implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-ads:17.0.0'

또한 광고 서비스 :

구현 'com.google.android.gms : play-services-ads : 17.0.0'

참고 : play-services-ads : 17.0.0에서는 Manifest 파일에 다음을 추가해야합니다. 그렇지 않으면 응용 프로그램을 열 때 충돌이 발생합니다.

<application>
    <!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
    <meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="[ADMOB_APP_ID]"/>
</application>

업데이트 # 2 2018년 5월 29일

문제의 외모되는 고정은 이제 사라, 나는 여전히 같은 Gradle을 CONFIGS을 사용하고 있습니다. 그러나 나는이 단계를 얼마 전에 수행했지만 이것들이 무엇을했는지 또는 이것이 서버 측 문제인지 최근에 수정 / 업데이트되었는지 확실하지 않습니다. 방금 다음 단계를 수행 한 후 문제가 사라지는 것을 알았습니다.

  1. 프로젝트 레벨 gradle.build 's buildscript > repositories및에 다음을 추가하십시오 allprojects > repositories.

    • google()
    • maven { url 'http://jcenter.bintray.com' }
  2. google-services 클래스 경로를 다음으로 변경하십시오.
    classpath com.google.gms:google-services:4.0.1'

  3. Gradle 파일과 프로젝트 동기화



UPDATE #1 2018/05/29

I got around the error by downgrading my firebase dependencies to ~12.0.0 in the app-level gradle. But this will severly impact the app, still looking around for more feasible workarounds.



    apply plugin: 'com.android.application'
    apply plugin: 'io.fabric'
    ...
    compile 'com.google.firebase:firebase-core:12.0.0'
    compile 'com.google.firebase:firebase-database:12.0.0'
    compile 'com.google.firebase:firebase-storage:12.0.0'
    compile 'com.google.firebase:firebase-auth:12.0.0'
    compile 'com.google.firebase:firebase-crash:12.0.0'
    ...




Same here, I have experienced the same issue described by @SimbaClaws. Everything was compiling smoothly until I faced the same issue yesterday.

I have the following codes in my project-level build.gradle,



    // Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript {
        repositories {
            jcenter()
            maven {
                url 'https://maven.fabric.io/public'
            }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.3.3'

            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
            //classpath 'com.google.gms:google-services:3.0.0'
            classpath 'com.google.gms:google-services:3.2.1'
            classpath 'io.fabric.tools:gradle:1.25.1'
        }
    }

    allprojects {
        repositories {
            jcenter()
            maven {
                url 'https://maven.google.com/'
            }
        }
    }

    task clean(type: Delete) {
        delete rootProject.buildDir
    }


And the following codes for the app-level build.gradle



    apply plugin: 'com.android.application'
    apply plugin: 'io.fabric'

    android {
        compileSdkVersion 26
        buildToolsVersion "26.0.1"
        defaultConfig {
            applicationId "my.secret.application"
            minSdkVersion 16 // 19
            targetSdkVersion 26
            versionCode 1
            versionName "5.0.204"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })

        compile 'com.google.firebase:firebase-core:15.0.2'
        compile 'com.google.firebase:firebase-database:15.0.0'
        compile 'com.google.firebase:firebase-storage:15.0.2'
        compile 'com.google.firebase:firebase-auth:15.1.0'
        compile 'com.google.firebase:firebase-crash:15.0.2'
        compile 'com.android.support:appcompat-v7:26.+'
        compile 'com.android.support:design:26.+'
        compile 'com.android.support:recyclerview-v7:26.+'
        compile 'com.android.support.constraint:constraint-layout:1.0.2'
        compile 'de.hdodenhof:circleimageview:2.2.0'
        compile 'com.android.support:palette-v7:26.+'
        compile 'com.android.support:support-v4:26.+'
        compile 'com.android.support:cardview-v7:26.+'
        compile 'com.github.bumptech.glide:glide:3.7.0'
        compile 'org.greenrobot:eventbus:3.1.1'
        testCompile 'junit:junit:4.12'
        compile 'com.crashlytics.sdk.android:crashlytics:2.9.1'
    }


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


Can anyone advise if I missed anything? I'm also still looking around for possible workarounds and answers. TIA!


Had same issue, for me none of the answers mentioned here worked. So I just updated dependencies in the gradle file and whichever dependency had com.google.gms: (kept them at same version example 16.0.0)


I have also experienced this issue. The root cause, I found out was that there inconsistent build Gradle version. In the Gradle Scripts repository "if I can call it that " there are two build gradle modules. The build.gradle (Project: name of app) and the build.gradle (Module: app). Make sure that classpath 'com.android.tools.build:gradle:3.2.1' in dependencies is using the latest and same version of the tool. Inconsistencies result in issues with the build.

참고URL : https://stackoverflow.com/questions/50563407/could-not-find-play-services-basement-aar

반응형