android NDK問題彙總

  • android NDK r9編譯問題

I put this in my Application.mk to solve the same problem.android

APP_CFLAGS += -Wno-error=format-security 
- See more at: http://www.cocos2d-x.org/forums/6/topics/32437?r=33260#message-33260
  • Android NDK native method

Your package/class names do not match.web

JNIEXPORT jstring JNICALL Java_com_example_ndktesting_ndktest_MainActivity_invokeNativeFunction(JNIEnv* env, jobject thiz)

Would be a method in the classui

com.example.ndktesting.ndktest.MainActivity

 

  • Eclipse環境配置出現錯誤:

Eclipse環境新建環境出現以下錯誤:this

Android NDK: jni/Android.mk: Cannot find module with tag 'CocosDenshion/android' in import path    spa

Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?    .net

Android NDK: The following directories were searched:    code

Android NDK:          jni/Android.mk:19: ***orm

Android NDK: Aborting.    .  Stop.blog

 

解決方案爲:ip

在項目proj.android\jni\Android.mk(E:\Research\cocos2d\cocos2d-2.0-x-2.0.2\GameThieves\proj.android\jni\Android.mk)

文件中添加路徑:

$(call import-add-path, E:\Research\cocos2d\cocos2d-2.0-x-2.0.2)\

$(call import-add-path, E:\Research\cocos2d\cocos2d-2.0-x-2.0.2\cocos2dx\platform\third_party\android\prebuilt)\
$(call import-module,CocosDenshion/android) \

$(call import-module,cocos2dx) \

$(call import-module,extensions)

參考http://blog.csdn.net/wangbofei/article/details/7951362

相關文章
相關標籤/搜索