Skip to content

Commit 5305e38

Browse files
authored
fix(android): AGP 9.0 no longer supports proguard-android.txt (#684)
Replace getDefaultProguardFile('proguard-android.txt') with getDefaultProguardFile('proguard-android-optimize.txt') in android/build.gradle. proguard-android.txt is no longer supported in AGP 9+ since it includes -dontoptimize, which prevents R8 from performing optimizations. This causes a build failure for projects using Android Gradle Plugin 9.x. See https://capawesome.io/blog/how-to-fix-capacitor-plugin-build-errors-with-agp-9/
1 parent 3ed8a8b commit 5305e38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ android {
3333
buildTypes {
3434
release {
3535
minifyEnabled false
36-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
36+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
3737
}
3838
}
3939
lintOptions {

0 commit comments

Comments
 (0)