Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
108 views
in Technique[技术] by (71.8m points)

android - Warning: Exported activity does not require permission

I recently created a project and added a splash and a main activity. I edited the manifest file and added the splash activity and the main activity in to it. After adding the main activity, it gives me a warning "Exported Activity Does not Require Permission". What is this warning that it gives me? my API version is android:15.

Please help, Thank you!

this is my manifest file!

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

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

<application android:label="@string/app_name"
    android:icon="@drawable/ic_launcher"
    android:theme="@style/AppTheme">
    <activity
        android:name=".SplashActivity"
        android:label="@string/app_name"
        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="com.sliit.droidman.main.MainActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="com.sliit.droidman.main.MAINACTIVITY" />
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>
    </activity>
</application>

</manifest>
question from:https://stackoverflow.com/questions/11333988/warning-exported-activity-does-not-require-permission

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

add this to your activity definition

android:exported="false"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...