4

I am newbie in COCOS2D for Android, While trying to run the sample project(HelloWorld) provided from cocos2d I got " FATAL EXCEPTION: main" and in detail that arrived in LogCat

05-31 19:11:46.920: E/AndroidRuntime(7719): FATAL EXCEPTION: main
05-31 19:11:46.920: E/AndroidRuntime(7719): java.lang.ExceptionInInitializerError
05-31 19:11:46.920: E/AndroidRuntime(7719):     at java.lang.Class.newInstanceImpl(Native Method)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at java.lang.Class.newInstance(Class.java:1429)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at android.os.Looper.loop(Looper.java:123)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at android.app.ActivityThread.main(ActivityThread.java:4627)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at java.lang.reflect.Method.invokeNative(Native Method)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at java.lang.reflect.Method.invoke(Method.java:521)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at dalvik.system.NativeStart.main(Native Method)
05-31 19:11:46.920: E/AndroidRuntime(7719): Caused by: java.lang.UnsatisfiedLinkError: Library helloworld not found
05-31 19:11:46.920: E/AndroidRuntime(7719):     at java.lang.Runtime.loadLibrary(Runtime.java:461)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at java.lang.System.loadLibrary(System.java:557)
05-31 19:11:46.920: E/AndroidRuntime(7719):     at org.cocos2dx.application.ApplicationDemo.<clinit>(ApplicationDemo.java:81)
05-31 19:11:46.920: E/AndroidRuntime(7719):     ... 15 more

So can anyone please help with some idea/solution. Again i followed reference from "http://www.multigesture.net/articles/how-to-setup-cocos2d-x-windows-and-android/"

Thanks a lot.

vgonisanz
  • 11,831
  • 13
  • 78
  • 130
Jai Android
  • 2,131
  • 10
  • 38
  • 55

1 Answers1

2

I recomend you to change libraries to cocos2d-x, because cocos2d for android won't be updated anymore.

Cocos2d-x works in C++, and uses JNI (Java native interface) to work. Here is all the info you will need to start using it.

Community
  • 1
  • 1
vgonisanz
  • 11,831
  • 13
  • 78
  • 130