简体   繁体   中英

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?

如果在声明活动时它位于同一个包中,则应该提供带有点(。)前缀的活动的完整包名或活动的类名。

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM