Android Proguard Javascript Interface Fail Android Proguard Javascript Interface Fail java java

Android Proguard Javascript Interface Fail


If MyJavaScriptInterface is an inner class of MyClass, ProGuard expects a fully qualified name com.mypackage.MyClass$MyJavaScriptInterface. The naming convention with $ is used in the compiled class files on which ProGuard operates. Note that ProGuard mentions class names in the configuration that it can't find in the input jar, suggesting that these names may have been misspelled.


    -keepclassmembers class com.mypackage.MyClass$JavaScriptInterface {    public *;     }

Use only this. It works for me.


Those Who are laze to provide the entire package path.

-keepclassmembers class **.*$PaymentJavaScriptInterface{public *;}