I have a Webview with some Javascript interface
public class WebAppInterface {
@JavascriptInterface
void buttonClick() {
listener.onButtonClicked();
}
}
This is how it's added to the view
webView.addJavascriptInterface(new WebAppInterface(), "Android");
In debug build the listener is working.
In release build, made by Jenkins, it doesn't work.
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "terminal_${variant.versionName}.apk"
}
}
}
}
It shouldn't be related to Proguard, because minify is disabled.
I tried different Proguard settings anyway, it didn't helped.
How to make it work in release build?