ExoPlayer
ExoPlayer copied to clipboard
Unable to package for distribution with cronet-embedded due to proguard error
trafficstars
ExoPlayer Version
2.18.1
Devices that reproduce the issue
It's a build issue not a device issue
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
We're getting this error when building:
Z:\app\proguard-rules.pro:254:35: R8: Expected char '-' at Z:\app\proguard-rules.pro:254:35
Packaging (Android (ASTC)): -keep class org.chromium.net:cronet-embedded.*{;}
Packaging (Android (ASTC)): ^
Packaging (Android (ASTC)): C:\Users\foo\caches\transforms-2\files-2.1\24ab64baf123a3d956060315164905e3\jetified-cronet-embedded-105.5195.68\proguard.txt:26:30: R8: Expected [!]interface|@interface|class|enum
Packaging (Android (ASTC)): > Task :app:minifyReleaseWithR8 FAILED
and here are the proguard rules:
<proguardAdditions>
<insert>
-keep class org.chromium.net:cronet-embedded.{*;}
-keep interface org.chromium.net:cronet-embedded.{;}
-dontwarn androidx.
-keep class androidx. {; }
-keep interface androidx.** { *; }
</insert>
</proguardAdditions>
Expected result
expect it to build successfully
Actual result
See reproduction steps
Media
N/A
Bug Report
- [X] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
Although something like this works without any error:
-keep class org.chromium.net.*
-keep interface org.chromium.net.*
-dontwarn androidx.*
-keep class androidx.*
-keep interface androidx.*
This issue looks like a general question about Android development. We'll leave this issue open for ~2 weeks in case anyone wishes to answer it here, however we recommend asking such questions on Stack Overflow.