Huawei Mobile application Installation error code analysis
In the process of application development, application installation failure is often encountered. Today, we will analyze the main installation error codes on some Huawei mobile phones to help you quickly solve the application installation problem.
1. The installation package is invalid or incomplete, or incompatible with the operating system (error code: -2).
Cause: An invalid installation package was uploaded when the third-party application was launched
Solution: Upload the correct installation package
2. Insufficient storage space (Error code: -4)
Cause: The application installation space is insufficient
Solution: Clean up the phone space, you can search the phone housekeeper, enter the phone housekeeper cleaning acceleration
3. Apps with the same package name on the mobile phone (error code: -5)
Cause: The old and new huawei application package names are replaced. The new package name is installed on the mobile phone, but the old package name APK cannot be installed
Solution: Change the application package name to a new package name
4. Update incompatible (error code: ****-7)
Cause: The name of the installed application package is the same as that on the mobile phone, but the signature is different
Solution: Change the packaged signature to the signature of the previous version
5. Share user is incompatible (error code: -8)
Cause: The application is a ShareUid application. The signature of the application is inconsistent with that of the installed ShareUid application, causing the installation failure.
Solution: Ensure that the signature is consistent with the existing ShareUid application signature
6. Shared library is lost (error code: -9)
Cause analysis: Applications rely on shared libraries that do not exist in the system. The most common one is Google Map Library, which causes installation failures
Solution: It is recommended that applications integrate HMS to avoid the problems of the Google Map Library.
7. The name of the application component conflicts with the installed application (error code: -13).
Cause: The ContentProvider defined by the application conflicts with an application already installed on the mobile phone
How to determine what application conflicts with:
1. View the log to find the installation failure callback
The 2020-12-26 09:39:06. 589 PackageManager/InstallResultReceiver [INFO] main {1} package install callback:packageName:[com.MobileTicket],statusCode:[5],extraStatus:[INSTALL_FAILED_CONFLICTING_PROVIDER: Scanning Failed.: Can’t install because provider name com.mpaas.demo.nebula.provider (in package com.MobileTicket) is already used by com.hanweb.hnzwfw.android.activity],otherPkgName:[null],storagePath:[null],resultCode:[-13]
Adb command to get all the ContentProvider definitions on the offending phone and see which app conflicts with the one to install.
adb shell dumpsys package providers >d:/temp/provider.txt
Solutions:
Uninstall the Provider Authorities app from ContentProvider on your phone to resolve the conflict
8. The application is incompatible with the CPU of this device (error code: -113, -16)
Possible cause: Application packaging is not adapted to a specific CPU version
Solution: The application must be compatible with the CPU type.
9. Application verification timeout (error code: -21) & Application verification failure (error code: -22)
Cause analysis: The mobile phone will automatically check the validity of the application in Google Play Store, and the network connection times out during the access. Normally delivered mobile phones will not take the initiative to check the application in Google Play Store, unless the user takes the initiative to upgrade the Google Play Store or an app downloaded by the user upgrades the Google Play Store. Causes checkout timeout.
Solutions:
1. Go to the phone to set — Application — Application Management — find the menu button on the interface and click display system application — find the Google Play Store — find the uninstall button or the menu button in the interface and click uninstall update —–. If the interface displays disabled application, click Disable (no need to set).
2. Setting –Google– security —- Goole play protection mechanism inside the switch is enabled, if enabled, then all off.
10. An earlier version exists, and the installation package cannot be installed (error code: -25).
Cause analysis: Android is a multi-user mechanism. There may be sub-users or applications with a higher version in the privacy space, which may lead to the failure to install. In addition, users may participate in activities such as mass testing, which may lead to the installation of a higher version
Solution: Check whether an earlier version exists in subusers and privacy space. If yes, uninstall the earlier version and install it
11. Parsing failed (error code: -102)
Cause: The installation package is incorrectly packed, causing the parsing failure
Solution: Find the download path in the log, download APK through a computer browser, and check whether the error message is displayed through ADB. If you install apK through other channels, contact huawei app developers
12. Installation package does not contain any certificates (error code: -103)
Cause: There is no certificate in the installation package. The installation package contains a user-specific package and is sent to the user.
Workaround: Require developers to add certificates.
13. Unknown error (error code: -111)
Cause: Only Huawei applications cannot be installed. Other applications can be installed properly, or other applications cannot be installed. Applications cannot be installed on a customized device
Solution: This equipment may be the model of Dingqiao dual system police pass, you need to contact dingqiao hotline feedback problems.
14. Permissions defined by applications conflict with those of existing applications (Error code: -112)
Cause: The permissions of the installed application conflict with those of the applications already installed on the mobile phone. In the detailed analysis, the conflicting permissions are displayed
Solution: The developer needs to modify the custom permissions
The original link: developer.huawei.com/consumer/cn…
Original author: Mayism