Android的Java权限拒绝的manifest.xml [英] android java permissions denial manifest.xml

查看:225
本文介绍了Android的Java权限拒绝的manifest.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我想建立我的项目,但我得到了如下因素误差

Hi i am trying to build my project but i am getting the folowing error

ActivityManager:java.lang.SecurityException异常:权限拒绝:启动意向{行动= android.intent.action.MAIN猫= [android.intent.category.LAUNCHER] FLG = 0x10000000的CMP = com.my_app.app / .choose_language }从零(PID = -1,UID = -1)需要空

ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.my_app.app/.choose_language } from null (pid=-1, uid=-1) requires null

我的清单文件如下

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.my_app.app"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" />


    <uses-sdk         
        android:targetSdkVersion="7" 
        android:minSdkVersion="7" 
 />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".Scan_AppActivity"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >

        </activity>
        <activity
            android:name=".nearby_exhibits"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >

        </activity>
        <activity
            android:label="@string/app_name"
            android:name=".SegmentedRadioActivity"
            android:theme="@android:style/Theme.Light" >
        </activity>
        <activity
            android:label="@string/app_name"
            android:name=".ds_main_page"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >

        </activity>
        <activity
            android:name=".my_scan"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >

        </activity>
        <activity
            android:name=".help_menu"
            android:theme="@android:style/Theme.NoTitleBar" >

        </activity>
        <activity
            android:name=".choose_language"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >
                             <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

        </activity>
        <activity
            android:name=".splash_screen"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >

        </activity>
        <activity
            android:name=".register_screen"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >

        </activity>
        <activity
            android:name=".login"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >
        </activity>
        <activity
            android:name=".attraction_more_info"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >

        </activity>
        <activity
            android:name="chosen_my_scan_attraction"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >

        </activity>
    </application>

</manifest>

如果我删除意图过滤器的一部分,加入到我闪屏的活动我的应用程序启动正常,但有任何其它活动这个启动code抛出上述错误。不知道anyne这是为什么?

if i remove the intent-filter part and add this to my splash screen activity my app starts fine but having this start up code on any other activity throws the above error. Does anyne know why this is?

推荐答案

通常情况下,需要空 SecurityException异常意味着该组件没有出口。这不应该是你的情况的一个问题 - 活动自动导出时,它有一个&LT;意向滤光器&gt; 。我会解决哪些活动您的应用程序将有&LT;意向滤光器&gt; ,并从设备/模拟器进行应用程序的完全卸载,然后重新安装看看如果这有助于。

Frequently, requires null in a SecurityException means that the component is not exported. That should not be a problem in your case -- an activity is automatically exported when it has an <intent-filter>. I would settle on which activity in your app will have the <intent-filter>, and do a full uninstall of the app from your device/emulator and then reinstall to see if this helps.

顺便说一句,普通的SDK应用程序不能持有 ACCESS_CHECKIN_PROPERTIES

BTW, ordinary SDK applications cannot hold ACCESS_CHECKIN_PROPERTIES.

这篇关于Android的Java权限拒绝的manifest.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆