ActivityManager:java.lang.SecurityException:Permission Denial:启动Intent {act = android.intent.act

时间:2022-06-06 21:27:05

I have a problem... I'm making a simple program about GIS, and when I'm trying to launch it from eclipse to my device, I get warning when I check the console.

我有一个问题......我正在编写一个关于GIS的简单程序,当我尝试从eclipse启动它到我的设备时,我会在检查控制台时收到警告。

ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.warteg.GIS/.Splash } from null (pid=16196, uid=2000) requires null

ActivityManager:java.lang.SecurityException异常:权限拒绝:启动意图{行为= android.intent.action.MAIN猫= [android.intent.category.LAUNCHER] FLG = 0x10000000的CMP = com.warteg.GIS / .Splash}从空(pid = 16196,uid = 2000)需要null

and the program is not installed in my device, but when I try with emulator from eclipse, the program is launched.

并且程序没有安装在我的设备中,但是当我从eclipse尝试使用模拟器时,程序就会启动。

Can someone solve my problem? Here's my manifest XML.

有人可以解决我的问题吗?这是我的清单XML。

<?xml version="1.0" encoding="utf-8"?>

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


<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >

  <activity 
        android:name="Splash"
        android:label="@string/app_name">
        <intent-filter>
            <category android:name="android.intent.category.LAUNCHER" />
            <action android:name="android.intent.action.MAIN" />

        </intent-filter>
    </activity>
        <uses-library android:name="com.google.android.maps"></uses-library>
    <activity android:name=".Splash"></activity>
    <activity android:name=".FormPetunjuk"></activity>
    <activity android:name=".Peta"></activity>
</application>

1 个解决方案

#1


6  

your are registering Splash activity two times in manifest.xml so remove this one:

你在manifest.xml中注册了两次Splash活动,所以删除这个:

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

#1


6  

your are registering Splash activity two times in manifest.xml so remove this one:

你在manifest.xml中注册了两次Splash活动,所以删除这个:

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