New android project crash while running ( I'm do none coding with it ) ?

New android project crash while running ( I'm do none coding with it ) ?
0.0 0


I’m trying to create new andorid project in windows without cygwin, but i got some problems.

First, I create a new android project in eclipse(integrated with NDK r8,ADT,Android SDK), as the “” do.

Then I copy all source files and resources in HelloWorld project to my project as the “” do.

After that, I modify just as the “” do.

I do some modify in the .java and .cpp files to keep package path correct.

Then i run my project. Compile is OK, but I got error when running as below:

06-26 10:18:37.166: W/dalvikvm(12306): No implementation found for native Lcom/mypro/lib/Cocos2dxActivity;.nativeSetPaths (Ljava/lang/String;)V
06-26 10:18:37.176: E/AndroidRuntime(12306): at com.mypro.lib.Cocos2dxActivity.nativeSetPaths(Native Method)
06-26 10:18:37.176: E/AndroidRuntime(12306): at com.mypro.lib.Cocos2dxActivity.setPackageName(
06-26 10:18:37.176: E/AndroidRuntime(12306): at
06-26 10:18:37.176: E/AndroidRuntime(12306): at

It seems the Cocos2dxActivity.nativeSetPaths method hasn’t native implementation.

Can anyone tell me why or give me a solution?


I found the native implementation is in cocos2dx/platform/android/jni/MessageJni.cpp , below is the code :

// set apk path
void Java_org_cocos2dx_lib_Cocos2dxActivity_nativeSetPaths(JNIEnv* env, jobject thiz, jstring apkPath)
const char* str = env~~>GetStringUTFChars;
env~~>ReleaseStringUTFChars(apkPath, str);

I check the in cocos2dx directory, MessageJni.cpp has been included into the compile list.

Now I really don’t know why the program can’t find this method while it running.

Really need help. omg ~~


having same problem
have you fixed it?
if yes please share the solution