与Keith更短的答案相同webView.addJavascriptInterface(this, "android");webView.loadUrl("javascript:android.onData(functionThatReturnsSomething)");并实现该功能@JavascriptInterfacepublic void onData(String value) { //.. do something with the data}不要忘了删除onData从proguard列表(如果启用的ProGuard)