1

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.

redderblock
  • 137
  • 1
  • 10

3 Answers3

0

Your manifest is invalid. Please put the uses-sdk tag inside the body of your manifest tag

Jordi
  • 1,357
  • 12
  • 20
0

In my project properties I checked the "is library" flag - cause otherwise I receive additional errors.

That's almost certainly wrong. You don't want your project to be a library. You should fix the errors you have in your project.

Falmarri
  • 47,727
  • 41
  • 151
  • 191
  • Ok, thank you. I removed the library flag and get an "Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace." according to http://stackoverflow.com/questions/2680827/conversion-to-dalvik-format-failed-with-error-1-on-external-jar I cleaned the project, but the error is still there – redderblock Nov 18 '13 at 23:02
  • Stack Trace: java.nio.BufferOverflowException at java.nio.Buffer.nextPutIndex(Unknown Source) at java.nio.HeapByteBuffer.putShort(Unknown Source) at com.android.dex.Dex$Section.writeShort(Dex.java:818) at com.android.dex.Dex$Section.writeTypeList(Dex.java:870) at com.android.dx.merge.DexMerger$3.write(DexMerger.java:437) ... – redderblock Nov 18 '13 at 23:07
  • There are several solutions for that other question. One of those is probably your solution too. Probably the one about having different packages import the same class. Do you have ActionbarSherlock as well as the android fragment compat jar on your build path? Because that's probably an error. – Falmarri Nov 20 '13 at 20:43
  • Solution: UNcheck the "is library" flag in my project + revert to SDK build tools 18.1.1 – redderblock Dec 02 '13 at 15:01
0

In Android studio I had the same issue and solved it by simply exiting the IDE, deleting .idea/workspace.xml and relaunching.

Haven't used Eclipse for android so can't tell specifically.

Sndn
  • 980
  • 12
  • 20