我正在使用两项活动开发Android活动:
事情是我无法解释的原因,它产生两个图标而不是一个。我不知道出了什么问题,但我只想知道有什么问题。这是我的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com. ... .myapplication" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.OpenGL_ES_V2" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
<!-- Required OpenGL ES 2.0. for Maps V2 -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:largeHeap="true"
android:allowBackup="true"
android:icon="@drawable/greenpolcircle"
android:launchMode="standard"
android:label="@string/app_name"
android:theme="@style/theme" >
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="..." />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<meta-data android:name="com.baidu.lbsapi.API_KEY" android:value="..." />
<uses-library android:name="com.google.android.maps" />
<!-- Splash screen -->
<activity
android:name=".SplashScreen"
android:label="appli"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="appli"
android:theme="@style/theme">
<!--android:label="@string/app_name" >-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
答案 0 :(得分:3)
删除
<category android:name="android.intent.category.LAUNCHER" />
来自MainActivity intent-filter 的
这意味着&#34;此活动是此应用程序的入口点&#34;,因此,如果您定义两个启动器,您的应用程序将有两个带有两个应用程序图标的入口点。