Skip to content

Commit

Permalink
android: build: Force all subprojects to use compileSdkVersion 34
Browse files Browse the repository at this point in the history
Force all subprojects to use compileSdkVersion 34 to resolve
resource linking error during APK release build

Added a `subprojects` block in `android/build.gradle` to ensure all
subprojects are compiled with `compileSdkVersion 34`. This temporary
workaround addresses the `android:attr/lStar` resource linking issue
when building the release APK. The block is placed before the existing
`subprojects` configuration to avoid evaluation errors.

flutter/flutter#153281 (comment)
  • Loading branch information
calcitem committed Aug 17, 2024
1 parent 4faf6b7 commit 29823f9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ui/flutter_app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ allprojects {
}

rootProject.buildDir = '../build'
subprojects {
afterEvaluate { project ->
if (project.plugins.hasPlugin("com.android.application") ||
project.plugins.hasPlugin("com.android.library")) {
project.android {
compileSdkVersion 34
}
}
}
}
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
Expand Down

0 comments on commit 29823f9

Please sign in to comment.