当前位置: 安卓之星 -> 安卓开发 -> android.intent.category.HOME报错的解决方法

android.intent.category.HOME报错的解决方法

作者:网络 发表于: 2016-09-15 点击: 901 次

android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]多次声明了activity报错 去掉一个就OK
android.intent.category.HOME] 这里的这个错误是由于调用onkey执行home方法,多次调用了home方法错误

加入 android.permission.REORDER_TASKS 就可以了
总结: 此类问题都是多次调用出错

java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/.Launcher } from ProcessRecord{3044e8e8 15310:cn.youteach.xxt2/10057} (pid=15310, uid=10057) requires android.permission.REORDER_TASKS
 at android.os.Parcel.readException(Parcel.java:1247)
 at android.os.Parcel.readException(Parcel.java:1235)
 at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1346)
 at android.app.Instrumentation.execStartActivity(Instrumentation.java:1373)
 at android.app.Activity.startActivityFromChild(Activity.java:3275)
 at android.app.Activity.startActivityForResult(Activity.java:3055)
 at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:817)
 at android.app.Activity.startActivity(Activity.java:3141)
 at cn.youteach.xxt2.ui.BaseActivity.launchHome(BaseActivity.java:594)
 at cn.youteach.xxt2.activitynew.XXTActivity.onKeyDown(XXTActivity.java:1150)
 at android.view.KeyEvent.dispatch(KeyEvent.java:1067)
 at android.app.Activity.dispatchKeyEvent(Activity.java:2286)
 at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1725)
 at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
 at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
 at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
 at android.widget.TabHost.dispatchKeyEvent(TabHost.java:303)
 at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
 at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
 at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1749)
 at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1177)
 at android.app.Activity.dispatchKeyEvent(Activity.java:2281)
 at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1725)
 at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2479)
 at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2449)
 at android.view.ViewRoot.handleMessage(ViewRoot.java:1743)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:123)
 at android.app.ActivityThread.main(ActivityThread.java:4737)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:521)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
 at dalvik.system.NativeStart.main(Native Method)

相关文章

相关文章

赶快留言冒泡

  • 评论 (0)
  • 引用通告 (0)
目前还没有任何评论.
目前还没有任何Trackbacks和Pingbacks.
吐个泡浮上去.