Installation did not succeed. The application could not be installed: INSTALL_PARSE_FAILED_NO_CERTIFICATES
时间: 2023-10-26 21:36:13 浏览: 153
安卓studio的INSTALL_FAILED_OLDER_SDK的解决方法
5星 · 资源好评率100%
This error occurs when the APK file you are trying to install is not signed with a valid certificate. To fix this issue, you need to either sign the APK with a valid certificate or uninstall the existing version of the app and try to install it again.
Here are the steps to sign your APK with a valid certificate:
1. Generate a new keystore file using the following command:
`keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000`
2. Replace `my-release-key.keystore` with the name you want to give your keystore file and `alias_name` with the name you want to give to your key.
3. Once the keystore file is generated, sign your APK using the following command:
`jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name`
4. Replace `my-release-key.keystore` and `alias_name` with the values you used in step 1 and `my_application.apk` with the name of your APK file.
5. Finally, verify your APK with the following command:
`zipalign -v 4 my_application.apk my_application_aligned.apk`
6. Replace `my_application.apk` with the name of your APK file and `my_application_aligned.apk` with the name you want to give to your aligned APK file.
After signing your APK with a valid certificate, try to install it again and it should work without any issues.
阅读全文