[英]android java permissions denial manifest.xml
Hi i am trying to build my project but i am getting the folowing error 嗨,我正在尝试建立我的项目,但出现以下错误
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 ActivityManager:java.lang.SecurityException:权限拒绝:启动Intent {act = android.intent.action.MAIN cat = [android.intent.category.LAUNCHER] flg = 0x10000000 cmp = com.my_app.app / .choose_language}从null (pid = -1,uid = -1)需要null
My manifest file is as following 我的清单文件如下
<?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>
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? 有谁知道这是为什么吗?
Frequently, requires null
in a SecurityException
means that the component is not exported. 通常,在SecurityException
requires null
表示不导出组件。 That should not be a problem in your case -- an activity is automatically exported when it has an <intent-filter>
. 在您的情况下,这应该不成问题-活动具有<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. 我会确定您应用程序中的哪个活动将具有<intent-filter>
,然后从您的设备/模拟器完全卸载该应用程序,然后重新安装以查看是否有帮助。
BTW, ordinary SDK applications cannot hold ACCESS_CHECKIN_PROPERTIES
. 顺便说一句,普通的SDK应用程序不能ACCESS_CHECKIN_PROPERTIES
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.