我有一個Android應用程序,我試圖通過教程發現啓動畫面,我發現並添加了一個額外的活動清單「SplashScreen」,但我的其他活動仍然首先加載。如果我拿出另一個,啓動屏幕將加載但崩潰。我怎樣才能讓SplashScreen先加載?Android錯誤的動作加載
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="projectmp.android"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<uses-library android:name="com.google.android.maps" />
<activity android:name=".SplashScreen"
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=".MissionPlanner"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="projectmp.android.MissionPlanner" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
感謝
從MissionPlanner聲明中刪除意圖過濾器,這不是必需的。一旦你做完了,SplashScreen崩潰就會看到你的LogCat輸出中的錯誤。 – Blundell
我以前試過,它不工作,這是錯誤: '[2011-07-10 07:17:32 - ProjectMP] ActivityManager:啓動:Intent {act = android.intent.action.MAIN cat = [android.intent.category.LAUNCHER] cmp = projectmp.android/.MissionPlanner} [2011-07-10 07:17:32 - ProjectMP] ActivityManager:java.lang.SecurityException:Permission Denial:starting Intent {act = android.intent.action.MAIN cat = [android.intent.category.LAUNCHER] flg = 0x10000000 cmp = projectmp.android/.MissionPlanner} from null(pid = -1,uid = -1)require null ' – PolishHurricane