前几天修改代码,把主程序所在的包的包名给改掉了,然后重装程序的时候,报错如下:
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" );
本来还以为发现了什么牛逼的知识,结果发现是自己看日志不认真。。。