2015-06-26 34 views
0

下面的xml用於在Android中創建啓動畫面。我已經測試並且工作正常。但是當我生成APK文件並安裝它將安裝2個應用程序? 一個是閃屏,另一個沒有閃屏。爲什麼?對不起,我是Android新手,只需按照教程。Android啓動畫面應用程序gererate 2 APK文件

<application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme" > 
    <!-- Splash screen --> 
    <activity 
     android:name="info.androidhive.androidsplashscreentimer.SplashScreen" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" 
     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> 

    <!-- Main activity --> 
    <activity 
     android:name="info.androidhive.androidsplashscreentimer.MainActivity" 
     android:label="@string/app_name" > 
    </activity> 
</application> 

回答

0

標籤標記應該只與應用標籤使用,

android:label="@string/app_name" 

所以從刪除此標籤標記:

<!-- Splash screen --> 
    <activity 
     android:name="info.androidhive.androidsplashscreentimer.SplashScreen" 
     android:label="@string/app_name" //remove this 
     android:screenOrientation="portrait" 
     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> 

    <!-- Main activity --> 
    <activity 
     android:name="info.androidhive.androidsplashscreentimer.MainActivity" 
     android:label="@string/app_name" //remove this > 
    </activity> 
相關問題