Android version update reports parsing package error

I don’t know if this has happened to you when updating the version. After the download is completed, the installation reports a package parsing error. What’s going on? Here are a few situations where this problem can arise;

1. The signature file or package name is inconsistent.
2. The version downloaded from the server is not as high as the local version.
3. During the test, the test version was installed on the mobile phone, while the official version was downloaded from the server during the update. At this time, the two The versions of the signature files are inconsistent and cannot be replaced. This is a situation where the signature files listed above are different.
4. The permissions that should be given are not given, such as download permissions.

<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

5. The permission problem of FileProvider in Android 7.0 system.
I have listed how to deal with this in the previous article. You can click to view it.
6. If there are no problems with the above, see if there is a problem with the download address provided by the server. I encountered This is the situation, just change the download address from "http" to "https"

The above situations are what I encountered during development. I will sort them out here today. I will add more if I encounter other situations in the future. I hope it can be helpful to everyone.

Guess you like

Origin blog.csdn.net/qq_42221857/article/details/103309816