firebase / firebase/firebase-cpp-sdk

[Bug] [Crash] Upgrade from 12.7.0 to 12.8.0 wont build due to: Execution failed for task ':checkDebugAarMetadata'... downgrading back to 12.7.0 builds fine!

Đang mở
#1,739 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
needs-triage new type: question
Ngôn ngữ chính
C++
Star
326
Fork
137
Merge trung bình
3 ngày 9 giờ
Pull request đã merge (30 ngày)
5

Mô tả

### [REQUIRED] Please fill in the following fields:

* Pre-built SDK from the [website](https://firebase.google.com/download/cpp) or open-source from this repo: repo
* Firebase C++ SDK version: 12.8.0
* Problematic Firebase Component: build
* Other Firebase Components in use: n/a
* Platform you are using the C++ SDK on: Windows
* Platform you are targeting: Android

### [REQUIRED] Please describe the issue here:

for existing project i only upgraded cpp sdk folder form 12.7.0 to 12.8.0, changed nothing (as always when upgrading)

#### Steps to reproduce:

Have you been able to reproduce this issue with just the [Firebase C++ quickstarts](https://github.com/firebase/quickstart-cpp) n/a as i work with cmake
What's the issue repro rate? (eg 100%, 1/5 etc) 100%

What happened? How can we make the problem occur?
build log:
[Incubating] Problems report is available at: file:///C:/Qt/Projects/Builds/build-Filmtoro-Android_Qt_6_9_1_Clang_x86_64-Debug/android-build-filmtoroMobile/build/reports/problems/problems-report.html

```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> 3 issues were found when checking AAR metadata:

1. Dependency 'com.google.android.gms:play-services-base:18.7.0' requires core library desugaring to be enabled
for :.

See https://developer.android.com/studio/write/java8-support.html for more
details.

2. Dependency 'com.google.android.gms:play-services-tasks:18.3.0' requires core library desugaring to be enabled
for :.

See https://developer.android.com/studio/write/java8-support.html for more
details.

3. Dependency 'com.google.android.gms:play-services-basement:18.7.0' requires core library desugaring to be enabled
for :.

See https://developer.android.com/studio/write/java8-support.html for more
details.
```

If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.

#### Relevant Code:

build.gradle (stripped by unnecessary comments etc, so problem-reprort.html wont match on lines):
```
buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
// versions from: https://firebase.google.com/support/release-notes/android
classpath 'com.android.tools.build:gradle:8.8.0' // Notice the 8.8 version here, not sure why but seems we always need to be one version less than what we updated
classpath 'com.google.gms:google-services:4.4.2' // Google Services plugin
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.4' // Crashlytics

def firebase_cpp_sdk_dir = System.getProperty('firebase_cpp_sdk.dir') // the lines below won't need to be changed later as the path is read from gradle.properties

gradle.ext.firebase_cpp_sdk_dir = "$firebase_cpp_sdk_dir"
apply from: "$firebase_cpp_sdk_dir/Android/firebase_dependencies.gradle"
}
}

repositories {
google()
mavenCentral()
}

apply plugin: qtGradlePluginType
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services' // Google Services plugin
apply plugin: 'com.google.firebase.crashlytics' // Crashlytics

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation 'androidx.core:core:1.13.1'

implementation(platform("com.google.firebase:firebase-bom:33.11.0")) // Import the BoM for the Firebase platform, version from: https://firebase.google.com/support/release-notes/android
implementation("com.google.firebase:firebase-crashlytics") // 19.4.4
implementation("com.google.firebase:firebase-crashlytics-ndk") // 19.4.4
implementation("com.google.firebase:firebase-analytics") // 22.4.0
}

android {
namespace androidPackageName
compileSdkVersion androidCompileSdkVersion
buildToolsVersion androidBuildToolsVersion
ndkVersion androidNdkVersion

packagingOptions {
jniLibs {
useLegacyPackaging true // Extract native libraries from the APK
keepDebugSymbols += '**/*.so' // unstripped version
}
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = [qtAndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qtAndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qtAndroidDir + '/res', 'res']
resources.srcDirs = ['resources']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
}

tasks.withType(JavaCompile) {
options.incremental = true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
incremental = true
}

lintOptions {
abortOnError false
}

// Do not compress Qt binary resources file
aaptOptions {
noCompress 'rcc'
}

defaultConfig {
resConfig "en"
minSdkVersion qtMinSdkVersion
targetSdkVersion qtTargetSdkVersion
ndk.abiFilters = qtTargetAbiList.split(",")
ndk.debugSymbolLevel "FULL"
}

buildTypes {
debug {
ndk {
debugSymbolLevel "FULL"
}
firebaseCrashlytics {
nativeSymbolUploadEnabled false
}
}
release {
ndk {
debugSymbolLevel "FULL"
}
firebaseCrashlytics {
nativeSymbolUploadEnabled true
}
}
}
}

// You must put here all modules you want from firebase c++ sdk
firebaseCpp.dependencies {
app
analytics
messaging
}
```

gradle.properties:
```
# Project-wide Gradle settings.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2500m -XX:MaxMetaspaceSize=768m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# Enable building projects in parallel
org.gradle.parallel=true

# Gradle caching allows reusing the build artifacts from a previous
# build with the same inputs. However, over time, the cache size will
# grow. Uncomment the following line to enable it.
#org.gradle.caching=true
#org.gradle.configuration-cache=true

# Allow AndroidX usage
android.useAndroidX=true
systemProp.firebase_cpp_sdk.dir=../../../extralibs/firebase_cpp_sdk

# debug all warnings during build
org.gradle.warning.mode=all

# enable build watching instead of auto discovery
org.gradle.vfs.watch=true

# singing
androidBuildToolsVersion=35.0.0
androidCompileSdkVersion=android-35
androidNdkVersion=26.1.10909125
androidPackageName=com.filmtoro.appMobile
buildDir=build
qt5AndroidDir=C:/Qt/6.9.1/android_x86_64/./src/android/java
qtAndroidDir=C:/Qt/6.9.1/android_x86_64/./src/android/java
qtGradlePluginType=com.android.application
qtMinSdkVersion=26
qtTargetAbiList=x86_64
qtTargetSdkVersion=34
```

NOTE:
1) even when its visible, I build from sdk 35 targetting sdk 34 with minimal sdk 26, so in theory **Desugaring** shall not be required at all!
2) tho for the test I tried to include **desugaring** according docs, but it just wont find the method coreLibraryDesugaringEnabled().. sure its not your issue i should address it in desugarging repo, but to me opinion the desugarging here is mistake and shall not be required by new 12.8.0 cpp sdk

problems-report.html attached, but doesnt say realy anything

[problems-report.zip](https://github.com/user-attachments/files/20837671/problems-report.zip)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.