当我运行 Android App Studio 时,单元格是应用程序“安装”两次:有两个应用程序,一个称为“SplashScreenActivity”,另一个称为“Doctor Quiz”(我的应用程序),两者是平等的。如果我卸载一个,另一个也会卸载.
为什么会发生这种情况?如何仅“安装”我的应用程序? (医生测验)
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.morais.daniela.doctorquiz" >
<uses-permission android:name="android.permission.INTERNET"/>
<provider android:authorities="com.facebook.app.FacebookContentProviderXXXX"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
<application
android:allowBackup="true"
android:icon="@drawable/medicine_box_icon2"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<activity
android:name=".Activity.SplashScreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/title_activity_splash_screen"
android:theme="@style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activity.QuestionsActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activity.ResultActivity"
android:label="@string/title_activity_result" >
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:label="@string/app_name" />
</activity>
</application>
</manifest>
Screenshot
该应用程序不会安装两次。你不是在看应用程序。您正在查看可启动的活动,其中包含以下内容<intent-filter>
:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
你有两项活动<intent-filter>
,因此主屏幕启动器中将有两个活动。如果您不想在主屏幕启动器中执行这两项活动,请将其删除<intent-filter>
来自其中之一。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)