我在啓動畫面後加載新的意圖時遇到問題。我已經看過與這個例外有關的問題,但他們似乎都在處理像谷歌播放或谷歌地圖沒有被正確引用的事情,這不是我的情況。android.content.ActivityNotFoundException:找不到處理意圖啓動畫面的活動
這是我看過
Not found activity to handle intent?
activity not found to handle intent
no activity found to handle intent
相關問題,下面是我的清單代碼
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.main"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<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=".HomePage"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.HOMEPAGE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".OrderPlaced"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.ORDERPLACED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
這裏是該類飛濺
package com.android.main;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class Splash extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread timer = new Thread(){
public void run(){
try{
sleep(1000);
}catch(InterruptedException e) {
e.printStackTrace();
}finally{
Intent openStartingPoint = new Intent("com.android.main.HOMEPAGE");
startActivity(openStartingPoint);
}
}
};
timer.start();
}
@Override
protected void onPause() {
super.onPause();
finish();
}
}
這裏的代碼是類主頁我想開機畫面加載啓動畫面後
package com.android.main;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
public class HomePage extends Activity {
/** Called when the activity is first created. */
TextView name;
EditText editName;
TextView drinks;
Spinner drinksSpinner;
TextView message;
CheckBox checkbox;
Button createOrderButton;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
createOrder();
}
public void createOrder(){
createOrderButton = (Button) findViewById(R.id.bCreateOrder);
createOrderButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
postInformationtoAPI();
}
private void postInformationtoAPI() {
goToOrderCompleted();
}
private void goToOrderCompleted() {
Intent intent = new Intent(HomePage.this , OrderPlaced.class);
HomePage.this.startActivity(intent);
Log.i("onClick", "trying to start new activity to change layout");
}
});
}
}
的應用部隊退出後加載並給出了以下異常
03-14 22:32:33.553: E/AndroidRuntime(3166): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.main.HOMEPAGE }
任何幫助,將不勝感激
非常感謝您解答它的快速反應。 – DavedCusack 2013-03-25 12:25:10