JDS
JDS

Reputation: 16978

Android NoClassDefFoundError when starting new activity thru intent

Weird issue here, doing something very trivial:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Intent i = new Intent(AutoVisionActivity.this, ExampleLoad3DSFile.class);
    startActivity(i);
}

In AndroidManifest.xml I have:

<activity android:name=".activities.ExampleLoad3DSFile"></activity>

And the class itself (ExampleLoad3DSFile) is in the same package as my main activity's onCreate from above. I've tried the standard clean project, refresh, and this: https://stackoverflow.com/a/12702315/624869 but to no avail.

What gives?

Upvotes: 0

Views: 2022

Answers (2)

dharmendra
dharmendra

Reputation: 7881

I have gone through same error but finally i found the reason why it occur while i was working on MIN3D project .

IParser parser = Parser.createParser(Parser.Type.MAX_3DS,
            getResources(), "com.min3d.sampleProject1:raw/monster_high", false);

Make sure you are using same the package name in ExampleLoad3DSFile class what you are using in your project .

Upvotes: 1

vinoth
vinoth

Reputation: 485

you should either give the full package name or the class name of the activity with the dot(.) prefixed if it is in the same package while declaring the activity.

Upvotes: 1

Related Questions