You may have encountered app installation failures during app development. Lets take a look at some of the most often reported errors on Huawei devices, what they mean and how you as a developer can fix them!
The app package is invalid, incomplete, or incompatible with the operating system (result code: -2).
Cause analysis: An invalid package is uploaded for a third-party app.
Solution: Upload a valid app package.Insufficient storage space (result code: -4).
Cause analysis: The storage space is insufficient for installing an app.
Solution: Open Optimizer and tap Cleanup to free up some storage space on your phone.An app with the same package name has already been installed on the device (result code: -5).
Cause analysis: The app cannot be installed as the package name already exists.
Solution: Change the package name to a new one.Incompatible update (result code: -7).
Cause analysis: The package name of the later version is the same as that of the earlier version currently installed, but their signatures are different.
Solution: Change the signature of the later version to that of the earlier one.Incompatible app that supports ShareUid (result code: -8).
Cause analysis: The installation failed because the signature of the to-be-installed app that supports ShareUid is different from that of the installed app that supports ShareUid.
Solution: Ensure that the signature is the same as that of the installed app that supports ShareUid.The shared library is lost (result code: -9).
Cause analysis: The Google Maps library that the app depends on does not exist. As a result, the app installation failed.
Solution: It is recommended that you integrate HMS Core into your app to avoid such dependency issues.-
An element name of the to-be-installed app is the same as that of an installed app (result code: -13).
Cause analysis: The ContentProvider defined in the app is the same as that of an installed app.
Perform the following steps to find the conflict:- View logs and check the installation failure callback information.
- Run the adb command to obtain all ContentProvider definitions on the device, and find the app that caused the conflict. adb shell dumpsys package providers >d:/temp/provider.txt Solution:Uninstall the conflicting app or resolve the conflict.
The app is incompatible with the CPU of the device (result code: -113 or -16).
Cause analysis: Adaptations for specific CPU versions were not performed when the app was packaged.
Solution: Adapt the app for the CPU version of the device in question.App verification timed out (result code: -21), and app verification failed (result code: -22).
Cause analysis: When the app was being automatically verified by Google Play, the network connection timed out. Usually, the preceding process is not triggered unless Google Play has been updated by the user or by a downloaded app, which leads to verification timeout.
Solution: On the device, go to Settings > Apps > Google Play Services and tap DISABLE on the App info page, or go to Settings > Apps > Google Play Services Updater and tap Uninstall updates in the upper right corner. Then click FORCE STOP (if available) to deactivate the app if it is still displayed in the app list.
On the device, ensure that Google Play Protect is disabled.The app package failed to be installed because a later version has been installed (result code: -25).
Cause analysis: Android devices allow for the creation of multiple user accounts. A non-owner account may have downloaded and installed a later version of the app in PrivateSpace for testing purposes. If so, the installation will fail.
Solution: Check whether a later version of the app is installed in PrivateSpace by a non-owner account. If so, uninstall the app and install it again.Parsing failed (result code: -102).
Cause analysis: An error occurred when generating the package, causing parsing to fail.
Solution: Contact the technical support of the corresponding channel to check logs to locate the download path, download the APK again using a browser, and then install the APK in ADB mode to check whether the error occurs again.The app package does not contain any certificates (result code: -103).
Cause analysis: The app package is for Early Access targeting specific users and does not contain any certificates.
Solution: Add a certificate to the app package.Unknown error (result code: -111).
Cause analysis: The device is a TD Tech dual-system policing terminal and is customized to limit app installation.
Solution: Instruct users to contact TD Tech for assistance.
Top comments (0)