code

'UploadMappingFileTask' 유형 속성 'googleServicesResourceRoot'에 구성된 값이 없습니다.

starcafe 2023. 6. 7. 23:02
반응형

'UploadMappingFileTask' 유형 속성 'googleServicesResourceRoot'에 구성된 값이 없습니다.

클래스 경로를 업데이트한 후 더 이상 앱의 릴리스 버전을 빌드할 수 없습니다.

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':app:uploadCrashlyticsMappingFileRelease' (type 'UploadMappingFileTask').
  - Type 'UploadMappingFileTask' property 'googleServicesResourceRoot' doesn't have a configured value.
    
    Reason: This property isn't marked as optional and no value has been configured.
    
    Possible solutions:
      1. Assign a value to 'googleServicesResourceRoot'.
      2. Mark property 'googleServicesResourceRoot' as optional.



    A problem was found with the configuration of task ':app:uploadCrashlyticsMappingFileRelease' (type 'UploadMappingFileTask').
  - Type 'UploadMappingFileTask' property 'googleServicesResourceRoot' doesn't have a configured value.

변경 로그를 읽으려고 했지만 지침이나 문서가 없었습니다.

이 문제를 해결하려면 의 Firebase 플러그인보다 먼저 Google 서비스 플러그인을 적용해야 합니다./app/build.gradle.

이 경우 다음 오류가 발생합니다.

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-perf'

하지만 다음은 그렇지 않습니다.

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.firebase-perf

참고:com.google.gms.google-services에 있음 com.google.firebase.crashlytics.

다음으로 업데이트할 때com.google.firebase:firebase-crashlytics-gradle:2.7.0변경 사항을 동기화하면 다음과 같은 수정 사항이라는 메시지가 표시됩니다.

Configure project :app
Crashlytics could not find Google Services plugin task: processReleaseGoogleServices. Make sure com.google.gms.google-services is applied BEFORE com.google.firebase.crashlytics. If you are not using the Google Services plugin, you must explicitly declare `googleServicesResourceRoot` inputs for Crashlytics upload tasks.

확인

'com.google.gms.google-services'

다음 이전에 적용됩니다.

'com.google.firebase.crashlytics'

오류를 수정했습니다.

저 또한 아무것도 찾지 못했는데, 지금은 2.6.1로 소방 기반-충돌 분석-등급으로 변경하는 것이 괜찮을 것 같습니다.

내 프로젝트가 사용되지 않았습니다.'com.google.gms.google-services'추가해야 합니다.'com.google.gms.google-services'플러그인의 애플리케이션 수준 Gradle 파일 및 해당 클래스 경로 종속성classpath 'com.google.gms:google-services:latest-version'프로젝트 수준 Gradle 파일에 있습니다.

또한 확인합니다.com.google.gms.google-services앞에 오는com.google.firebase.crashlytics다른 회답에서 말한 바와 같이

이것은 제가 테스트할 때 일어난 일입니다.minifyEnabled true내 안에서debug빌드합니다.

디버그 빌드에 다음을 추가하는 중유형이 문제를 해결해 주었습니다.

      firebaseCrashlytics
          {
            mappingFileUploadEnabled false
          }

플러그인 적용 줄을 이미 올바른 순서로 지정했지만 플러그인 작업을 찾을 수 없다는 빌드 오류 및 동기화 경고가 여전히 표시됩니다.저는 구글 서비스 업그레이드 가능성을 고려했지만 버전 4.1.0은 제가 할 수 있는 한 높았습니다.더 높게 설정하면 라이브러리 종속성을 찾을 수 없다는 오류가 발생합니다.

구글 서비스를 4.3.14로 업그레이드해야 했을 뿐만 아니라, 정의했습니다.mavenCentral()프로젝트 수준 build.gradle의 리포지토리로는 충분하지 않았으며 앱 수준 build.gradle에 정의해야 했습니다.

buildscript {
    repositories {
        google()
        mavenCentral() // Add this line
    }
    dependencies {
        classpath 'com.google.gms:google-services:4.3.14'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

시작 설명서 어디에도 이 작업이 필요하다고 언급되지 않았습니다. 따라서 이 작업이 저와 같은 상황에 처한 모든 사람에게 도움이 되기를 바랍니다.

언급URL : https://stackoverflow.com/questions/67865303/type-uploadmappingfiletask-property-googleservicesresourceroot-doesnt-have

반응형