Search code examples
androidruntime-errornoclassdeffounderrorcocos2d-android

Cocos2d-android - CCGLSurfaceView no class def found, but lib is referenced with source code


I am attempting to follow along to this tut: HERE but using a sprite sheet and animating the sprites. The app builds clean, no errors or warnings, but at runtime i get a java.lang.NoClassDefNotFound error on CCGLSurfaceView, even though i have the library in the class path and have even attached the source code. here is a pic of the error and the library in the package explorer in the apps project folder.Eclipse Screenshot the error throws on line 26 in the screen. anyone know what might be the culprit? i realize that it is saying the class file isn't in the classpath but when i right click on the library in the package explorer and go Build Path > , i have the option to remove from the build path, so i know it is in there. for some reason I'm pretty stumped right now, so any help would be appreciated. thanks.


Solution

  • Ok since you updated to revision 17 you should put your libraries in a folder libs in the root of your project. The Android build system will do the rest there is no need to manually add the library to the build path.

    The change is descibed at the tools.android.com homepage: Dealing with dependencies in Android projects