Android 为什么该应用程序安装了两次?
当我运行Android App Studio时,手机显示应用程序“安装”了两次:有两个应用程序,一个叫做“SplashScreenActivity”,另一个叫做“医生问答”(我的应用程序),这两个应用程序是相等的。如果我卸载一个,另一个也会卸载。Android 为什么该应用程序安装了两次?,android,android-studio,Android,Android Studio,当我运行Android App Studio时,手机显示应用程序“安装”了两次:有两个应用程序,一个叫做“SplashScreenActivity”,另一个叫做“医生问答”(我的应用程序),这两个应用程序是相等的。如果我卸载一个,另一个也会卸载。为什么会发生这种情况?如何“安装”我的应用程序?(博士问答) AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="htt
为什么会发生这种情况?如何“安装”我的应用程序?(博士问答) 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>
屏幕截图该应用程序未安装两次。你不是在看应用程序。您正在查看可启动的活动,即具有以下内容的活动:
您有两个带有该
的活动,因此在主屏幕启动器中有两个活动。如果您不想在主屏幕启动器中同时使用这两个活动,请从其中一个活动中删除该活动。很可能您在清单文件中指定了两个活动作为启动器。这就引发了这个问题
换成
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>