2015-10-14 38 views
0

我刚刚将eclipse项目转换为android studio项目并通过USB调试安装了studio build。将我的项目转换为Android Studio后通过usb调试运行的应用程序安装了三次

我安装了我的应用程序三次,如果我点击第一个应用程序,它会打开应用程序,如果我点击其他2个应用程序,它的强制关闭。我如何删除其他两个相同的应用程序。

我得到了这个讨论一个URL没有得到解决我的问题

http://stackoverflow.com/questions/12867455/android-app-gets-installed-3-times-when-ran-once-on-android-device 
+0

显示您的Android清单 – Virthuss

+0

只有一个主要在maifect @Virthuss – Vji

+0

这不是问题^^我们需要它来帮助你。只是发布:) – Virthuss

回答

1

确保您AndroidManifest.xml看起来是这样的:

  ... 
     <activity 
      android:name=".SplashScreen" 
      android:label="..." 
      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="..." 
      android:theme="@style/theme"> 
      <!--android:label="@string/app_name" >--> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
      </intent-filter> 
     </activity> 

如果你有三次

<category android:name="android.intent.category.LAUNCHER" /> 

你也会有三个图标。请保留此主要活动,即用于启动应用程序的活动。为其他人删除它。

+0

谢谢Virthuss ... – Vji

+0

把它作为有这个问题的人接受的答案!祝你好运:) – Virthuss

1

是的问题是,我的应用程序导入两个拥有主要活动的自己的库,我替换了两个库中的主要活动。所以现在的问题得到解决......但在日食不像我认为...

相关问题