我在2019年3月25日之后获得了PackageNotFoundException com.google.android.webview,在我的应用中,受影响的用户大部分使用的是android版本5、6或7,该用户主要使用Samsung或LGE设备。从那以后,我在分析工具中看到了一个例外,此事影响了许多用户。
我读了一些线程说更新Web视图后在棒棒糖设备中发生崩溃,但就我而言,我在Android版本6或7的设备中也遇到了异常,我已经尝试过重现错误,但没有运气那个。
错误的堆栈跟踪:
Caused by android.content.pm.PackageManager$NameNotFoundException
com.google.android.webview
android.app.ApplicationPackageManager.getPackageInfo (ApplicationPackageManager.java:235)
android.webkit.WebViewFactory.fetchPackageInfo (WebViewFactory.java:107)
android.webkit.WebViewFactory.getProviderClass (WebViewFactory.java:183)
android.webkit.WebViewFactory.getProvider (WebViewFactory.java:158)
android.webkit.WebView.getFactory (WebView.java:2290)
android.webkit.WebView.ensureProviderCreated (WebView.java:2285)
android.webkit.WebView.setOverScrollMode (WebView.java:2344)
android.view.View. (View.java:4065)
android.view.View. (View.java:4186)
android.view.ViewGroup. (ViewGroup.java:591)
android.widget.AbsoluteLayout. (AbsoluteLayout.java:55)
android.webkit.WebView. (WebView.java:609)
android.webkit.WebView. (WebView.java:554)
android.webkit.WebView. (WebView.java:537)
android.webkit.WebView. (WebView.java:524)
java.lang.reflect.Constructor.newInstance (Constructor.java)
android.view.LayoutInflater.createView (LayoutInflater.java:631)
com.android.internal.policy.PhoneLayoutInflater.onCreateView (PhoneLayoutInflater.java:58)
android.view.LayoutInflater.onCreateView (LayoutInflater.java:706)
android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:774)
android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:716)
android.view.LayoutInflater.rInflate (LayoutInflater.java:847)
android.view.LayoutInflater.rInflateChildren (LayoutInflater.java:810)
android.view.LayoutInflater.rInflate (LayoutInflater.java:855)
android.view.LayoutInflater.rInflateChildren (LayoutInflater.java:810)
android.view.LayoutInflater.rInflate (LayoutInflater.java:855)
android.view.LayoutInflater.rInflateChildren (LayoutInflater.java:810)
android.view.LayoutInflater.inflate (LayoutInflater.java:527)
android.view.LayoutInflater.inflate (LayoutInflater.java:429)
android.view.LayoutInflater.inflate (LayoutInflater.java:380)
android.support.v7.app.AppCompatDelegateImplV9.setContentView (AppCompatDelegateImplV9.java:287)
android.support.v7.app.AppCompatActivity.setContentView (AppCompatActivity.java:139)
android.app.Activity.performCreate (Activity.java:6904)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1136)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3266)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3415)
android.app.ActivityThread.access$1100 (ActivityThread.java:229)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1821)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:148)
android.app.ActivityThread.main (ActivityThread.java:7325)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)