No Activity found to handle intent errors
I am stumped, I get No Activity to handle intent, I have checked the
manifest etc. Can someone have a quick look at this and see what I am
doing wrong here.
This is my java class
'import com.one2.indoor.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
public class Menu extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ImageButton tut1 = (ImageButton) findViewById(R.id.activitymain);
tut1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity (new Intent("com.indoor.ActivityMain"));
}
});
}'
This is my ActivityMain class
'import com.one2.indoor.R;
import android.app.Activity;
import android.os.Bundle;
public class ActivityMain extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.tutorial);
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
}
}'
and finally my manifest
'<activity
android:name="com.indoor.Main"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.indoor.Menu"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.indoor.MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.indoor.ActivityMain"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.indoor.ACTIVITYMAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.indoor.ActivityMain" />
</activity>
</application>
</manifest>
I just cant see it, why I'm getting the error. Any help be much appreciated
No comments:
Post a Comment