解决app重装后自动打开app,报错找不到首页的Activity的问题

前几天修改代码,把主程序所在的包的包名给改掉了,然后重装程序的时候,报错如下:

java.lang.RuntimeException: Unable to start receiver weifan.vvgps.receiver.PkInstallReceiver: android.content.ActivityNotFoundException: Unable to find explicit activity class {weifan.vvgps/weifan.vvgps.main.LoginActivity}; have you declared this activity in your AndroidManifest.xml?

后来找到原因,是因为修改包名的时候,没有将自动安装相关的receiver里的首页给修改过来尴尬

newIntent.setClassName( "weifan.vvgps","weifan.vvgps.main.LoginActivity" );

本来还以为发现了什么牛逼的知识,结果发现是自己看日志不认真。。。

猜你喜欢

转载自icesort.iteye.com/blog/2118827