New package not yet registered with the system 解决方法

当出现这个问题时候一瞬间有种崩溃的冲动,怎么搞都不行 点击直接运行后报错提示我下边这串玩意(手机屏幕上给我带个new 而且显示不出app logo,这是要逆天)

04-07 14:07:52.541: E/WifiManager(12996): mWifiServiceMessenger == null
04-07 14:07:52.628: E/AndroidRuntime(12996): FATAL EXCEPTION: main
04-07 14:07:52.628: E/AndroidRuntime(12996): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.haotang.pet/com.haotang.pet.MainActivity}: java.lang.SecurityException: Requires READ_PHONE_STATE: Neither user 10101 nor current process has android.permission.READ_PHONE_STATE.
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2438)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.app.ActivityThread.access$600(ActivityThread.java:162)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1379)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.os.Handler.dispatchMessage(Handler.java:108)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.os.Looper.loop(Looper.java:153)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.app.ActivityThread.main(ActivityThread.java:5902)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at java.lang.reflect.Method.invokeNative(Native Method)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at java.lang.reflect.Method.invoke(Method.java:511)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at dalvik.system.NativeStart.main(Native Method)
04-07 14:07:52.628: E/AndroidRuntime(12996): Caused by: java.lang.SecurityException: Requires READ_PHONE_STATE: Neither user 10101 nor current process has android.permission.READ_PHONE_STATE.
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.os.Parcel.readException(Parcel.java:1425)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.os.Parcel.readException(Parcel.java:1379)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at com.android.internal.telephony.IPhoneSubInfo$Stub$Proxy.getDeviceId(IPhoneSubInfo.java:182)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:346)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.telephony.ZTEPrivacyTelephonyManager.getDeviceId(ZTEPrivacyTelephonyManager.java:86)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at com.haotang.pet.util.Global.getIMEI(Global.java:159)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at com.haotang.pet.MainActivity.getIndex(MainActivity.java:396)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at com.haotang.pet.MainActivity.onCreate(MainActivity.java:205)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.app.Activity.performCreate(Activity.java:5181)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2400)
04-07 14:07:52.628: E/AndroidRuntime(12996): 	... 11 more


项目安装过程中提示 

[2016-04-07 14:12:13 - Pet_put_svn] ------------------------------
[2016-04-07 14:12:13 - Pet_put_svn] Android Launch!
[2016-04-07 14:12:13 - Pet_put_svn] adb is running normally.
[2016-04-07 14:12:13 - Pet_put_svn] Performing com.haotang.pet.FlashActivity activity launch
[2016-04-07 14:12:14 - Pet_put_svn] Uploading Pet_put_svn.apk onto device 'V5S'
[2016-04-07 14:12:15 - Pet_put_svn] Installing Pet_put_svn.apk...
[2016-04-07 14:12:25 - Pet_put_svn] Success!
[2016-04-07 14:12:26 - Pet_put_svn] Starting activity com.haotang.pet.FlashActivity on device V5S
[2016-04-07 14:12:26 - Pet_put_svn] New package not yet registered with the system. Waiting 3 seconds before next attempt.
[2016-04-07 14:12:29 - Pet_put_svn] Starting activity com.haotang.pet.FlashActivity on device V5S
[2016-04-07 14:12:29 - Pet_put_svn] New package not yet registered with the system. Waiting 3 seconds before next attempt.
[2016-04-07 14:12:32 - Pet_put_svn] Starting activity com.haotang.pet.FlashActivity on device V5S
[2016-04-07 14:12:32 - Pet_put_svn] New package not yet registered with the system. Waiting 3 seconds before next attempt.
[2016-04-07 14:12:35 - Pet_put_svn] Starting activity com.haotang.pet.FlashActivity on device V5S
[2016-04-07 14:12:36 - Pet_put_svn] New package not yet registered with the system. Waiting 3 seconds before next attempt.
[2016-04-07 14:12:39 - Pet_put_svn] Starting activity com.haotang.pet.FlashActivity on device V5S
[2016-04-07 14:12:39 - Pet_put_svn] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.haotang.pet/.FlashActivity contextId=0, taskId=0 }
[2016-04-07 14:12:39 - Pet_put_svn] ActivityManager: Error type 3
[2016-04-07 14:12:39 - Pet_put_svn] ActivityManager: Error: Activity class {com.haotang.pet/com.haotang.pet.FlashActivity} does not exist.

那那那 就是上边这串鬼。。解决方案:project --> clean 选中你的项目 执行 完了就ok 可以正常运行了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

有时有晌

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值