capacitor-community / capacitor-community/native-audio

Android build fails with AGP 9.x: proguard-android.txt not found

Open Beginner friendly
#181 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
154
Forks
78
PR merge metrics
No merged PRs in 30d

Description

## Description

The Android build fails when using Android Gradle Plugin 9.x because `proguard-android.txt` was removed in recent AGP versions. Only `proguard-android-optimize.txt` is available.

## Error

```
Execution failed for task ':capacitor-community-native-audio:...'
> proguard-android.txt not found
```

## Fix

In `android/build.gradle`, line 33:

```diff
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
```

This is backwards-compatible — `proguard-android-optimize.txt` has been available since early Android SDK versions.

## Environment

- @capacitor-community/native-audio: 8.0.0
- Android Gradle Plugin: 9.2.1
- Gradle: 9.4.1
- Capacitor: 8.x

Contributor guide

Open the contributing guide

Research direction

Start in android/build.gradle at line 33 and inspect the proguardFiles configuration described in the issue. Apply the requested Android Gradle Plugin compatibility change, then run the Android build to confirm the missing-file error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
build-system, mobile
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.