Android – non export activity: start on the simulator; SecurityException on mobile phone

There is a non export activity in my project

If I try to start it on my phone using ADB:

adb shell am start -n "packagename/activityname"

I received an error:

java.lang.SecurityException:
Permission Denial: starting Intent { ... } from null (...) not exported from uid ...

But if I run the same command on the simulator, everything is normal. How?

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>