- React-Native 환경에서./gradlew assembleRelease 명령어를 통해서 APK 파일을 생성하기 위해서 터미널에서 명령어를 수행하였으나 아래와 같은 빌드 오류가 발생하였습니다.
WARNING: The specified Android SDK Build Tools version (33.0.0) is ignored, as it is below the minimum supported version (34.0.0) for Android Gradle Plugin 8.2.1. Android SDK Build Tools 34.0.0 will be used. To suppress this warning, remove "buildToolsVersion '33.0.0'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. What went wrong: Could not determine the dependencies of task ':app:uploadCrashlyticsMappingFileDevRelease'. Cannot query the value of this property because it has no value available.
- 아래와 같이 com.google.firebase.crashlytics와 com.google.gms.google-services 플러그인 위치를 확인해야 한다고 합니다. - 우선적으로 com.google.gms.google-services가 먼저 설치되고 com.google.firebase.crashlytics가 설치되어야 하는 순서 변경이 필요합니다.
plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
id "com.facebook.react"
id 'com.google.firebase.crashlytics'
id "com.google.gms.google-services"
}
💡 위치 변경 적용
plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
id "com.facebook.react"// 해당 부분의 위치를 변경하였습니다.
id "com.google.gms.google-services"
id 'com.google.firebase.crashlytics'
}
- 기존의 아래와 같은 설정을 하였습니다. 이에 대해 Maven Repository를 참고하여서 최신버전으로 업데이트를 하였습니다.
💡 build.gradle 파일
// 변경 이전
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'// 변경 이후
classpath "com.google.gms:google-services:4.4.2"
classpath "com.google.firebase:firebase-crashlytics-gradle:3.0.2"
💡 app/build.gradle 파일
// 변경 이전implementationplatform('com.google.firebase:firebase-bom:32.3.1')
implementation'com.google.firebase:firebase-analytics'implementation'com.google.firebase:firebase-crashlytics'// 변경 이후implementationplatform('com.google.firebase:firebase-bom:33.2.0')
implementation'com.google.firebase:firebase-analytics:22.1.0'implementation'com.google.firebase:firebase-crashlytics:19.0.3'