如何解决(安全性例外:拒绝权限:启动意图)

时间:2019-04-30 20:02:12

标签: react-native-android

运行代码时出现此错误

开始:意图{cmp = com.inspireui.mstorepro / .MainActivity}

  

安全异常:权限被拒绝:启动意图{   flg = 0x10000000 cmp = com.inspireui.mstorepro / .MainActivity}从null   (pid = 8776,uid = 2000)未从uid 10963导出

     

java.lang.SecurityException:权限拒绝:启动Intent {   flg = 0x10000000 cmp = com.inspireui.mstorepro / .MainActivity}从null   (pid = 8776,uid = 2000)未从uid 10963导出   com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1936)           在com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:639)           在com.android.server.am.ActivityStarter.startActivityLocked(ActivityStarter.java:419)           在com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1308)           在com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:6035)           在com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:424)           在com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:142)           在android.os.ShellCommand.exec(ShellCommand.java:96)           在com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:18894)           在android.os.Binder.shellCommand(Binder.java:581)           在android.os.Binder.onTransact(Binder.java:481)           在android.app.IActivityManager $ Stub.onTransact(IActivityManager.java:4775)           在com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3863)           在android.os.Binder.execTransact(Binder.java:682)

我正在Visual Studio代码上运行本机运行的Android

这是我的manifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.inspireui.mstorepro"
          android:versionCode="1"
          android:versionName="1.0">

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

    <application
            android:name=".MainApplication"
            android:allowBackup="true"
            android:hardwareAccelerated="true"
            android:largeHeap="true"
            android:label="@string/app_name"
            android:icon="@mipmap/ic_launcher"
            android:theme="@style/AppTheme"
            android:supportsRtl="true">

        <activity android:name=".SplashActivity"
                android:exported="true"
                android:launchMode="singleTop"
                android:label="@string/app_name"
                android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
                android:windowSoftInputMode="adjustResize"
                android:theme="@style/AppTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name=".MainActivity"/>


        <activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/fb_app_id"/>

    </application>
</manifest>

0 个答案:

没有答案