Have a detached (ExpoKit) app and trying to run on android device. iOS runs fine (with react-native run-ios
). When running react-native run-android
(with a device connected, USB debug enabled) I get:
Running /Users/.../Library/Android/sdk/platform-tools/adb -s 4ad25a1d reverse tcp:8081 tcp:8081
Starting the app on 4ad25a1d (/Users/joaopedreira/Library/Android/sdk/platform-tools/adb -s 4ad25a1d shell am start -n host.exp.exponent/host.exp.exponent.MainActivity)...
Starting: Intent { cmp=host.exp.exponent/.MainActivity }
java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=host.exp.exponent/.MainActivity } from null (pid=15926, uid=2000) not exported from uid 10179
at android.os.Parcel.readException(Parcel.java:1540)
at android.os.Parcel.readException(Parcel.java:1493)
at android.app.ActivityManagerProxy.startActivityAsUser(ActivityManagerNative.java:2574)
at com.android.commands.am.Am.runStart(Am.java:740)
at com.android.commands.am.Am.onRun(Am.java:304)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:99)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)
Process finished with exit code 0
Tried to set android:exported="true"
in the .MainActtvity
intent but that didn’t work (and it shouldn’t be necessary, since the activity has a filter and, thus, “exported” defaults to true).
Any help is appreciated.