我正在开发基于AOSP Android 6.0(Marshmallow)的设备
我想将标准Android webview更新为使用最新JavaScript的最新版本
为此,我用最新版本替换了external/chromium-webview/prebuilt/arm64/webview.apk
同样在frameworks/base/core/res/res/values/config.xml
我将config_webViewPackageName
的值从com.android.webview
更改为com.google.android.webview
。
但是当我尝试使用webview(例如标准的android浏览器)启动一些应用程序时,我遇到了这样的错误:
10-10 12:08:08.923 17802 17802 I WebViewFactory: Loading com.google.android.webview version 61.0.3163.98 (code 316309850)
10-10 12:08:52.107 20530 20530 E WebViewFactory: error loading provider
10-10 12:08:52.107 20530 20530 E WebViewFactory: java.lang.ClassNotFoundException: com.android.webview.chromium.WebViewChromiumFactoryProvider
10-10 12:08:52.107 20530 20530 E WebViewFactory: at java.lang.Class.classForName(Native Method)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at java.lang.Class.forName(Class.java:324)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.webkit.WebViewFactory.getChromiumProviderClass(WebViewFactory.java:229)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:193)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:158)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.webkit.CookieManager.getInstance(CookieManager.java:39)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at com.android.browser.BrowserSettings.syncSharedSettings(BrowserSettings.java:312)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at com.android.browser.BrowserSettings.setController(BrowserSettings.java:148)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at com.android.browser.Controller.<init>(Controller.java:235)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at com.android.browser.BrowserActivity.createController(BrowserActivity.java:84)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at com.android.browser.BrowserActivity.onCreate(BrowserActivity.java:73)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.app.Activity.performCreate(Activity.java:6251)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.os.Handler.dispatchMessage(Handler.java:102)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.os.Looper.loop(Looper.java:148)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at java.lang.reflect.Method.invoke(Native Method)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:742)
10-10 12:08:52.107 20530 20530 E WebViewFactory: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632)
有人遇到过这样的问题吗?
答案 0 :(得分:2)
最后我们发现问题是因为webmusic.apk没有使用系统签名进行签名。这就是为什么没有正确安装的原因 问题How to sign Android app with system signature?的步骤解决了这个问题。