我在模拟器(和手机上)上运行应用程序,并且它在主屏幕中创建2个快捷方式。如果我删除该应用程序,它将删除这两个快捷方式。Android应用程序在主屏幕上创建重复的快捷方式
我的应用程序有splash screen
然后转到主屏幕,我正在使用android studio。
我认为是与<intent-filter>
有关,但每次我删除时,我运行的应用程序,它再次出现在两个<activity>
自动。
清单文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.epicbit.tecnoprolab"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="23" />
<receiver android:name="receiver.NetworkChangeReceiver" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<!-- Splash screen -->
<activity
android:name="com.example.epicbit.tecnoprolab.SplashScreen"
android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.epicbit.tecnoprolab.MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
编辑: 检查此视频,了解当我按照你的sugestions发生什么:
不工作。当我在android studio上运行时。自动他再次添加: ' intent-filter>' 我的mainActivity。我不明白为什么。 –
@CarlosBranco您是否在应用程序中添加了一些库?或类似的东西?也许,Android Studio正在合并清单文件与另一个... – W0rmH0le
我的项目是非常小的。 http://i.imgur.com/2Lo80Yl.png 选中此项。嗯,我不明白为什么会发生这种情况。 –