민프

[Flutter Error] Flutter Version 3.24.0 업그레이드 이후 Execution failed for task ':sign_in_with_apple:verifyReleaseResources'... 본문

[Flutter Error]

[Flutter Error] Flutter Version 3.24.0 업그레이드 이후 Execution failed for task ':sign_in_with_apple:verifyReleaseResources'...

민프야 2024. 9. 12. 10:50

Flutter Version을 3.24.0으로 올리고 Build를 하려고 하는데 아래와 같은 에러가 나왔다

* What went wrong:
Execution failed for task ':sign_in_with_apple:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:/Users/msoh/development/pushApp/push_now_app/build/sign_in_with_apple/intermediates/merged_res/release/values/values.xml:204: AAPT: error: resource android:attr/lStar not found.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

https://github.com/livekit/client-sdk-flutter/issues/569

 

[bug] Flutter v3.24.0 Android build failure (android:attr/lStar not found) · Issue #569 · livekit/client-sdk-flutter

Describe the bug FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':livekit_client:verifyReleaseResources'. > A failure occurred while executing com.android.bui...

github.com


해당 이슈를 검색해보니 역시나 해결 방법이 있네요

아래와 같이 주석으로 설명되어있는 subprojects를 추가해주면 정상적으로 build가 됩니다.

// android/build.gradle

     subprojects {
        // 모든 하위 프로젝트에 대해 처리
        afterEvaluate { project ->
            // 하위 프로젝트가 Android 애플리케이션 또는 라이브러리 플러그인을 가지고 있을 경우에만 실행
            if (project.plugins.hasPlugin("com.android.application") ||
                    project.plugins.hasPlugin("com.android.library")) {
                // 하위 프로젝트의 Android 설정을 구성
                project.android {
                    // compileSdkVersion을 34로 설정 (Android SDK 버전 34로 컴파일하도록 설정)
                    compileSdkVersion 34

                    // Android 빌드 도구 버전을 34.0.0으로 설정
                    buildToolsVersion "34.0.0"
                }
            }
        }
    }


    subprojects {
        project.buildDir = "${rootProject.buildDir}/${project.name}"
    }
    subprojects {
        project.evaluationDependsOn(':app')
    }

 

 

Comments