-2
它說我沒有發現我的啓動程序活動,當我明確地將啓動程序放在清單中時出於某種原因沒有定義,雖然它沒有啓動它。錯誤說沒有找到啓動程序的活動
public class SplashLaunch extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.splashlaunch);
final Main d = new Main(this);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
setContentView(d);
}
}, 5000);
}
}
這裏是清單文件。在這裏,你可以看到活動.LAUNCHER,但由於某種原因,它沒有打這個代碼或什麼?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Tripps.thesimplegame"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".SplashLaunch"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.SPLASHLAUNCH" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".YouFailed"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.YOUFAILED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
這不會opent的。主要類 –
您需要在您使用類別指定動作''android.intent.action.MAIN' android.intent .category.LAUNCHER'。否則,您的應用程序的圖標將不會在應用程序啓動器中列出 –