当前位置:   article > 正文

android.content.pm.PackageManager$NameNotFoundException: com.google.android.webview错误

android.content.pm.packagemanager$namenotfoundexception

最近在工作中遇到手机系统在很多情况下报错
信息如下:

01-01 22:22:27.922 18772 18772 E AndroidRuntime: FATAL EXCEPTION: main

01-01 22:22:27.922 18772 18772 E AndroidRuntime: Process: com.sprd.note, PID: 18772

01-01 22:22:27.922 18772 18772 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {com.sprd.note/com.sprd.note.NoteEditor}: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: android.content.pm.PackageManager$NameNotFoundException: com.google.android.webview

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3104)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3135)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2482)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.ActivityThread.-wrap11(ActivityThread.java)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5452)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:762)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)

01-01 22:22:27.922 18772 18772 E AndroidRuntime: Caused by: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: android.content.pm.PackageManager$NameNotFoundException: com.google.android.webview

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:211)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:158)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.webkit.WebView.getFactory(WebView.java:2285)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.webkit.WebView.findAddress(WebView.java:1691)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.text.util.Linkify.gatherMapLinks(Linkify.java:471)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.text.util.Linkify.addLinksSprd(Linkify.java:618)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.text.util.Linkify.addLinksSprd(Linkify.java:568)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at com.sprd.note.NoteEditor.updateDisplay(NoteEditor.java:217)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at com.sprd.note.NoteEditor.onResume(NoteEditor.java:198)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1261)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.Activity.performResume(Activity.java:6327)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3093)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    ... 10 more

01-01 22:22:27.922 18772 18772 E AndroidRuntime: Caused by: android.webkit.WebViewFactory$MissingWebViewPackageException: android.content.pm.PackageManager$NameNotFoundException: com.google.android.webview

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.webkit.WebViewFactory.fetchPackageInfo(WebViewFactory.java:109)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:183)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    ... 21 more

01-01 22:22:27.922 18772 18772 E AndroidRuntime: Caused by: android.content.pm.PackageManager$NameNotFoundException: com.google.android.webview

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:140)

01-01 22:22:27.922 18772 18772 E AndroidRuntime:    at android.webkit.WebViewFactory.fetchPackageInfo(WebViewFactory.java:107)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69

后来发现是gms.mk中去掉webviewGoogle应用的问题

PRODUCT_PACKAGES += \
    AndroidForWork \
    ConfigUpdater \
    GoogleBackupTransport \
    GoogleFeedback \
    GoogleLoginService \
    GoogleOneTimeInitializer \
    GooglePartnerSetup \
    GoogleServicesFramework \
    GoogleCalendarSyncAdapter \
    GoogleContactsSyncAdapter \
    GoogleTTS \
    GmsCore \
    SetupWizard \
    Phonesky \
    WebViewGoogle
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

添加上WebViewGoogle就ok了。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/292545
推荐阅读
相关标签
  

闽ICP备14008679号