2013-03-09 141 views
0

標題解釋了它好看多了,這裏是明顯的:啓動活動沒有啓動第一

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="eu.craym.vulcrum.firstgametnb" 
android:versionCode="1" 
android:versionName="1.0" > 

<uses-sdk 
    android:minSdkVersion="8" 
    android:targetSdkVersion="17" /> 

<application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme" > 
    <activity 
     android:name=".Splash" 
     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=".StartingPoint" 
     android:label="@string/app_name" > 
     <intent-filter> 
      <action android:name="eu.craym.vulcrum.STARTINGPOINT" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
</application> 

</manifest> 

然而,每當我運行該應用程序,歸類的起點首先被調用:

[2013-03-09 18:36:40 - FirstGameTNB] Starting activity eu.craym.vulcrum.firstgametnb.StartingPoint on device emulator-5554 

爲什麼這發生?我認爲MAIN和LAUNCHER應該是這樣做的,所以Splash類首先被調用,但是這從來沒有發生過。請注意,當我刪除StartingPoint活動時,它會轉到Splash。

+0

不需要定義'意向Filter'到'activity'起點。我認爲你必須在Splash-Activity中使用Intent才能導航到StartingPoint-Activity。 – Harpreet 2013-03-09 19:09:42

+0

你如何「運行」你的應用程序? Eclipse運行按鈕?您設備上的圖標? – Hartok 2013-03-10 01:17:14

回答

0

你說得對。你可以嘗試清理你的項目。

android.intent.action.MAIN:作爲主入口點開始,沒有 希望接收數據。

Source

+0

我剛試過,它沒有工作:/ – user1972854 2013-03-09 18:51:25