java.lang.SecurityException: Permission Denial: starting Intent

Android app安装后点击应用图标启动应用报错。提示该应用未安装。

 

Launcher does not have the permission to launch Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.injoy.faustcity/com.u8.sdk.U8UnityContext bnds=[329,1490][497,1658] (has extras) }. Make sure to create a MAIN intent-filter for the corresponding activity or use the exported attribute for this activity.
11-08 11:38:37.889: E/Launcher(3753): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.injoy.faustcity/com.u8.sdk.U8UnityContext bnds=[329,1490][497,1658] (has extras) } from ProcessRecord{fc8e81d 3753:com.miui.home/u0a29} (pid=3753, uid=10029) not exported from uid 10269
11-08 11:38:37.889: E/Launcher(3753):     at android.os.Parcel.createException(Parcel.java:1942)
11-08 11:38:37.889: E/Launcher(3753):     at android.os.Parcel.readException(Parcel.java:1910)
11-08 11:38:37.889: E/Launcher(3753):     at android.os.Parcel.readException(Parcel.java:1860)
11-08 11:38:37.889: E/Launcher(3753):     at android.app.IActivityManager$Stub$Proxy.startActivity(IActivityManager.java:3705)
11-08 11:38:37.889: E/Launcher(3753):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673)
11-08 11:38:37.889: E/Launcher(3753):     at android.app.Activity.startActivityForResult(Activity.java:4639)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.Launcher.startActivityForResult(Unknown Source:11)
11-08 11:38:37.889: E/Launcher(3753):     at android.app.Activity.startActivity(Activity.java:4954)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.Launcher.startActivity(Unknown Source:101)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.Launcher$PerformLaunchAction.run(Unknown Source:28)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.Launcher$PerformLaunchAction.launch(Unknown Source:55)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.Launcher.launch(Unknown Source:34)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.ShortcutInfo.handleClick(Unknown Source:138)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.Launcher.onClick(Unknown Source:19)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.View.performClick(View.java:6608)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.View.performClickInternal(View.java:6585)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.View.access$3100(View.java:785)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.View$PerformClick.run(View.java:25919)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.ItemIcon.post(Unknown Source:13)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.View.onTouchEvent(View.java:13806)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.ItemIcon.onTouchEvent(Unknown Source:13)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.View.dispatchTouchEvent(View.java:12527)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3026)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2705)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.CellLayout.dispatchTouchEvent(Unknown Source:169)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.Workspace.dispatchTouchEvent(Unknown Source:36)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.MinusOneScreenView.dispatchTouchEvent(Unknown Source:71)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.ForceTouchLayer.dispatchTouchEvent(Unknown Source:32)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2719)
11-08 11:38:37.889: E/Launcher(3753):     at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:458)
11-08 11:38:37.889: E/Launcher(3753):     at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1830)
11-08 11:38:37.889: E/Launcher(3753):     at android.app.Activity.dispatchTouchEvent(Activity.java:3453)
11-08 11:38:37.889: E/Launcher(3753):     at com.miui.home.launcher.Launcher.dispatchTouchEvent(Unknown Source:20)
11-08 11:38:37.889: E/Launcher(3753):     at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:416)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.View.dispatchPointerEvent(View.java:12768)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5212)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5012)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4527)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4580)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4546)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4686)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4554)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4743)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4527)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4580)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4546)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4554)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4527)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7245)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7214)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7175)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7351)
11-08 11:38:37.889: E/Launcher(3753):     at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:187)
11-08 11:38:37.889: E/Launcher(3753):     at android.os.MessageQueue.nativePollOnce(Native Method)
11-08 11:38:37.889: E/Launcher(3753):     at android.os.MessageQueue.next(MessageQueue.java:326)
11-08 11:38:37.889: E/Launcher(3753):     at android.os.Looper.loop(Looper.java:160)
11-08 11:38:37.889: E/Launcher(3753):     at android.app.ActivityThread.main(ActivityThread.java:6812)
11-08 11:38:37.889: E/Launcher(3753):     at java.lang.reflect.Method.invoke(Native Method)
11-08 11:38:37.889: E/Launcher(3753):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
11-08 11:38:37.889: E/Launcher(3753):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
11-08 11:38:37.889: E/Launcher(3753): Caused by: android.os.RemoteException: Remote stack trace:
11-08 11:38:37.889: E/Launcher(3753):     at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1856)
11-08 11:38:37.889: E/Launcher(3753):     at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:750)
11-08 11:38:37.889: E/Launcher(3753):     at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:551)
11-08 11:38:37.889: E/Launcher(3753):     at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1211)
11-08 11:38:37.889: E/Launcher(3753):     at com.android.server.am.ActivityStarter.execute(ActivityStarter.java:493)

 

解决方案在应用主activity添加如下代码。

相关博客

 
                    
     
                

 

你可能感兴趣的:(Android)