Configure ProGuard

View the suggested configuration for ProGuard.


📘

NOTE

If you used Gradle to import the JW Player SDK for Android or downloaded the JW Player SDK for Android Open Source Demo, JW Player's consumer-proguard.pro configuration has been applied automatically. You can skip this article and configure the manifest.


If you used the Local approach, no ProGuard configuration has been added. If you choose to obfuscate your code with ProGuard, add the following ProGuard configuration. This suggested ProGuard configuration ensures that the JW Player SDK for Android will work as intended.


ProGuard Configuration
-keepclassmembers class com.longtailvideo.jwplayer.** {
    @android.webkit.JavascriptInterface *;
}

# Block warnings about missing module classes
-dontwarn com.longtailvideo.jwplayer.**
-dontwarn com.google.ads.interactivemedia.**

# Classes get rejected without this when running the app if the app has been run through ProGuard
-keepattributes InnerClasses,EnclosingMethod

# Keep module indicator classes
-keep class com.longtailvideo.jwplayer.modules.** { *; }


Did this page help you?