facebook-android-sdk icon indicating copy to clipboard operation
facebook-android-sdk copied to clipboard

Build failed on AGP 4.2.2 when target/compileSdkVersion 34

Open LeeSeungYun1020 opened this issue 7 months ago • 6 comments

Checklist before submitting a bug report

Java version

11.0.17

Android version

API 34, Android 14

Android SDK version

15.0.2

Installation platform & version

Gradle 6.7.1

Package

Core & AppEvents

Goals

Build failed when I changed targetSdkVersion and compileSdkVersion 33 to 34.

> Task :app:processDebugResources FAILED

Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Unexpected error during link, attempting to stop daemon.
     This should not happen under normal circumstances, please file an issue if it does.

I found that the build was successful if I excluded the androidx.legacy.legacy-support-v4 library.

    implementation ('com.facebook.android:facebook-android-sdk:15.0.2')
            {
        exclude group: "androidx.legacy", module: "legacy-support-v4"
    }

Please check whether there are any operation problems even if I exclude the androidx.legacy.legacy-support-v4 library.

Expected results

Build successful

Actual results

Build failed

Steps to reproduce

AGP 4.2.2 / gradle 6.7.1 / targetSdkVersion 34 / compileSdkVersion 34 / buildToolsVersion 30.0.3

Code samples & details

My Project Environment: AGP 4.2.2 / gradle 6.7.1 / targetSdkVersion 34 / compileSdkVersion 34 / buildToolsVersion 30.0.3

It seems to be a problem with the `androidx.legacy.legacy-support-v4` library rather than a facebook library problem.
So I would like to know if I can exclude the `androidx.legacy.legacy-support-v4` library.

Thanks.

LeeSeungYun1020 avatar Nov 14 '23 07:11 LeeSeungYun1020

I also checked latest version.

implementation 'com.facebook.android:facebook-android-sdk:latest.release'

LeeSeungYun1020 avatar Nov 14 '23 08:11 LeeSeungYun1020

same failed

bf234511171 avatar Nov 22 '23 03:11 bf234511171

same too,Unity 2020 must use AGP 4.2.2

aidoTank avatar Nov 30 '23 08:11 aidoTank

same issue here, any solution found?

sunilanumolu avatar Jan 06 '24 18:01 sunilanumolu

Hello everyone, I have the same problem, and it actually appears when I update to Android 14. Have any of you solved it?

cristian1206 avatar May 07 '24 04:05 cristian1206

Sorry for sharing late.
Including androidx.legacy:legacy-support-v4 library causes build error.
So I exclude legacy-suppory-v4 lib in my project.

implementation ('com.facebook.android:facebook-android-sdk:15.0.2') {
    exclude group: "androidx.legacy", module: "legacy-support-v4"
}

I tested login function; it is working well. And it is still working well without any problems.

LeeSeungYun1020 avatar May 15 '24 06:05 LeeSeungYun1020