Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package not found: com.android.chrome

Tags:

I have seen lots of crashes in the app with the message used as title here. Almost all of the crashes are on OnePlus devices and most of them are on the version of Oxygen OS forked from Android Oreo. Has anyone else seen this? The following is the stack trace:

 java.lang.RuntimeException: Package not found: com.android.chrome     at android.webkit.WebViewDelegate.getPackageId(WebViewDelegate.java:164)     at com.android.webview.chromium.ig.L(WebViewDelegateFactory.java:16)     at com.android.webview.chromium.WebViewChromiumFactoryProvider.h(WebViewChromiumFactoryProvider.java:177)     at com.android.webview.chromium.se.run(WebViewChromiumFactoryProvider.java:5)     at android.os.Handler.handleCallback(Handler.java:789)     at android.os.Handler.dispatchMessage(Handler.java:98)     at android.os.Looper.loop(Looper.java:164)     at android.app.ActivityThread.main(ActivityThread.java:6809)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 

Edit: 18th Feb, 2018:

We received our team's One Plus 5T(OnePlus A5010) a few weeks back and did not see any issue while running our app. The device came preloaded with the OxygenOS fork of Android 7.0. However, today the device received the Android 8.0.0(OxygenOS 5.0.3) update notification and after successfully installing the update, our app is crashing with the same stack trace. This crash is horribly affecting our user base. Any help will be appreciated.

like image 235
Jayesh Elamgodil Avatar asked Dec 22 '17 16:12

Jayesh Elamgodil


People also ask

What is com Google PackageInstaller?

What Is com.google.android.packageinstaller? com.google.android.packageinstaller is the package name of a pre-installed system app on the Android OS called Package Installer. For reference, Google Chrome's package name is com.android.chrome.

Why is chrome not working on my Android device?

Device needs to be on Android Oreo (Android 8.0) More than one user on device (For example, there’s a work profile and personal profile) Chrome is not enabled for at least one user on the device. Note: Chrome is disabled in the work profile by default. Chrome has been updated on the device and the device has [not?] restarted since Chrome updated.

What is the package name of package installer?

com.google.android.packageinstaller is the package name of a pre-installed system app on the Android OS called Package Installer. For reference, Google Chrome's package name is com.android.chrome.


2 Answers

WebView is now controlled by Chrome from Nougat. Reference

The solution that worked for me was commenting these lines in AndroidManifest.xml

<meta-data android:name="preloaded_fonts"             android:resource="@array/preloaded_fonts" />    

As suggested here

like image 110
Danish Ansari Avatar answered Oct 03 '22 01:10

Danish Ansari


Do you have multiple profiles on your device?

There is a known issue on the Google (Android Enterprise) support forums relating to WebView. It seems like the solution may well apply to your problem.

Summary:

A feature was added in Android Nougat to set the Chrome WebView as the default WebView and disable the Android System WebView app by default

This is a problem when:

  • Device needs to be on Android Oreo (Android 8.0)
  • More than one user on device (For example, there’s a work profile and personal profile)
  • Chrome is not enabled for at least one user on the device. Note: Chrome is disabled in the work profile by default.
  • Chrome has been updated on the device and the device has [not?] restarted since Chrome updated.
  • The Android System WebView app has not been updated via Google Play.

What you need to do:

Enable Chrome for each user on the device Or Wait for the Android System WebView app to update to its latest version (updates occur automatically within 24 hours provided the device has a WiFi connection)

like image 27
Nick Cardoso Avatar answered Oct 03 '22 01:10

Nick Cardoso