appView.addJavascriptInterface() does not work on API 17

前端 未结 4 2053
我寻月下人不归
我寻月下人不归 2021-02-01 05:27

i am able to use java function from my phonegap java script function and android 2.2 but same code is not run on API 17. what should i have to do to call native java code on fr

4条回答
  •  借酒劲吻你
    2021-02-01 06:27

    Solutions:

    1. Lower the android:targetSdkVersion in the manifest file to 16.
    2. Change the compilation api level to 17 in project.properties: target=android-17 and annotate the callback method with @JavascriptInterface.

提交回复
热议问题