Configure ProGuard

Last updated: January 8, 2019

If you used the Gradle or Demo approach to import the JW Player SDK for Android or 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 your project.

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.** { *; }

You can now configure your project.



Use this form to provide your feedback.