运行其他都没问题,但是一点按钮,游戏就重新运行

这是报错日志
E/AndroidRuntime: FATAL EXCEPTION: main
Process: cn.easymobi.game.saveMouse, PID: 31463
java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.easymobi.game.saveMouse/cn.easymobi.game.saveMouse.GetCoinActivity}: java.lang.SecurityException: getUniqueDeviceId: The user 10445 does not meet the requirements to access device identifiers.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3894)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4077)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread H . h a n d l e M e s s a g e ( A c t i v i t y T h r e a d . j a v a : 2458 ) a t a n d r o i d . o s . H a n d l e r . d i s p a t c h M e s s a g e ( H a n d l e r . j a v a : 110 ) a t a n d r o i d . o s . L o o p e r . l o o p ( L o o p e r . j a v a : 219 ) a t a n d r o i d . a p p . A c t i v i t y T h r e a d . m a i n ( A c t i v i t y T h r e a d . j a v a : 8387 ) a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( N a t i v e M e t h o d ) a t c o m . a n d r o i d . i n t e r n a l . o s . R u n t i m e I n i t H.handleMessage(ActivityThread.java:2458) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:219) at android.app.ActivityThread.main(ActivityThread.java:8387) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit H.handleMessage(ActivityThread.java:2458)atandroid.os.Handler.dispatchMessage(Handler.java:110)atandroid.os.Looper.loop(Looper.java:219)atandroid.app.ActivityThread.main(ActivityThread.java:8387)atjava.lang.reflect.Method.invoke(NativeMethod)atcom.android.internal.os.RuntimeInitMethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Caused by: java.lang.SecurityException: getUniqueDeviceId: The user 10445 does not meet the requirements to access device identifiers.
at android.os.Parcel.createException(Parcel.java:2071)
at android.os.Parcel.readException(Parcel.java:2039)
at android.os.Parcel.readException(Parcel.java:1987)
at com.android.internal.telephony.IHwTelephony S t u b Stub StubProxy.getUniqueDeviceId(IHwTelephony.java:3173)
at android.telephony.HwTelephonyManagerInner.getUniqueDeviceId(HwTelephonyManagerInner.java:1425)
at android.telephony.HwTelephonyManagerInnerUtils.getUniqueDeviceId(HwTelephonyManagerInnerUtils.java:71)
at android.telephony.HwInnerTelephonyManagerImpl.getUniqueDeviceId(HwInnerTelephonyManagerImpl.java:361)
at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:1653)
at cn.easymobi.util.EMUtil.getDeviceID(EMUtil.java:72)
at cn.easymobi.reward.RewardActivity.onCreate(RewardActivity.java:89)
at cn.easymobi.game.saveMouse.GetCoinActivity.onCreate(GetCoinActivity.java:19)
at android.app.Activity.performCreate(Activity.java:8121)
at android.app.Activity.performCreate(Activity.java:8109)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3867)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4077)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread H . h a n d l e M e s s a g e ( A c t i v i t y T h r e a d . j a v a : 2458 ) a t a n d r o i d . o s . H a n d l e r . d i s p a t c h M e s s a g e ( H a n d l e r . j a v a : 110 ) a t a n d r o i d . o s . L o o p e r . l o o p ( L o o p e r . j a v a : 219 ) a t a n d r o i d . a p p . A c t i v i t y T h r e a d . m a i n ( A c t i v i t y T h r e a d . j a v a : 8387 ) a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( N a t i v e M e t h o d ) a t c o m . a n d r o i d . i n t e r n a l . o s . R u n t i m e I n i t H.handleMessage(ActivityThread.java:2458) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:219) at android.app.ActivityThread.main(ActivityThread.java:8387) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit H.handleMessage(ActivityThread.java:2458)atandroid.os.Handler.dispatchMessage(Handler.java:110)atandroid.os.Looper.loop(Looper.java:219)atandroid.app.ActivityThread.main(ActivityThread.java:8387)atjava.lang.reflect.Method.invoke(NativeMethod)atcom.android.internal.os.RuntimeInitMethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)

  问题代码:
  	@Override
protected void onCreate(Bundle savedInstanceState) {

	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);//显示这行出问题
    app = (SaveMouseApp) getApplicationContext();
	getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
			WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
	setOnGetRewardListener(mReward);
}
也不会解决,也没红线,求大神们解决

猜你喜欢

转载自blog.csdn.net/weixin_42383690/article/details/115216145

相关文章