本帖最后由 Genius 于 2018-7-5 16:51 编辑
导出apk文件的时候改签名
因为程序覆盖安装主要检查两点:
1)两个程序的入口Activity是否相同。两个程序如果包名不一样,即使其它所有代码完全一样,也不会被视为同一个程序的不同版本;
2)两个程序所采用的签名是否相同。如果两个程序所采用的签名不同,即使包名相同,也不会被视为同一个程序的不同版本,不能覆盖安装。
android不想覆盖原来apk的方法 1.更改包名 :在项目上右击,选择Android Tools------>Rename Application Package------>改包名,一路回车。 ![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center) ![](https://img-blog.csdn.net/20140920102910525?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center) ![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center) ![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center) ![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center) ![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center) ![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center) ![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center) ![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center) ![](https://img-blog.csdn.net/20140920102710078?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2hlbmhhbzA1Njg=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
关于app包名一样的问题,请参考此链接https://blog.csdn.net/chenhao0568/article/details/39429909
|