This topic is frequently discussed here, but while I try to start my project in the emulator I receive the error:
cat=[android.intent.category.LAUNCHER] cmp=com.google.android.mzm/.FirstPage }
[2013-11-18 22:23:25 - MZM] ActivityManager: Error type 3
[2013-11-18 22:23:25 - MZM] ActivityManager: Error: Activity class
{com.google.android.mzm/com.google.android.mzm.FirstPage} does not exist.
I got this failure right from the beginning, the problem was still the same after renaming the package.
My project contains one main activity (FirstPage) and three fragments. Only the main activity is mentioned in the manifest.
Editing the android:name tag in the manifest from the fully qualified class name in a relative class name didn't change anything.
Some IntelliJ-User recommend 'to check the "Deploy application" checkbox in the Run/Debug Configuration screen, under the General tab'. Is there anything similar for me as a adt-bundle eclipse-user?
I've got some problems with my .apk, it sometimes disappears. In my project properties I checked the "is library" flag - cause otherwise I receive additional errors. Maybe that has to do anything with my Activity class problem...
My manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.mzm"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="14" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.google.android.mzm.FirstPage"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
my main class:
package com.google.android.mzm;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragmentActivity;
public class FirstPage extends SherlockFragmentActivity {
private ViewPager mViewPager;
private TabsAdapter mTabsAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mViewPager = new ViewPager(this);
mViewPager.setId(R.id.pager);
setContentView(mViewPager);
final ActionBar bar = getSupportActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
bar.setDisplayShowTitleEnabled(false);
bar.setDisplayShowHomeEnabled(false);
mTabsAdapter = new TabsAdapter(this, mViewPager);
mTabsAdapter.addTab(bar.newTab().setText("Schritt 1"), Fragment_1.class, null);
mTabsAdapter.addTab(bar.newTab().setText("Schritt 2"), Fragment_2.class, null);
mTabsAdapter.addTab(bar.newTab().setText("Schritt 3"), Fragment_3.class, null);
}
}
Thank you.