我刚做了一个小app之前已经安装在我的手机上了,用eclipse安装没问题,但是直接安装apk文件的话就会安装失败,必须卸载之前的才能安装,以前也出现过这样的情况,请问谁有经验指导我一下。
巴扎黑2017-04-17 13:37:51
The android documentation is clearly written.
Applications can only be replaced if the package name and signature are consistent. If only the package names are the same, attempts to replace them will be rejected due to inconsistent signatures.
The apk file generated in the bin directory in eclipse comes with a debug signature.
According to the original poster, it should be installed after exporting the apk. Exporting the apk requires customizing a signature. The two signatures are inconsistent. So the installation failed.
天蓬老师2017-04-17 13:37:51
We often encounter inconsistent signatures, so we must uninstall and then install again. Sometimes we need to restart the phone
黄舟2017-04-17 13:37:51
It may be that the signatures of the packages are inconsistent. If the signatures are consistent, check whether the version number is set correctly. A higher version can overwrite a lower version, but not vice versa.