android-studio(1):配置NDK開發環境

android-studio使用jni

根據如下的鏈接一步一步的操作就可以完成了。

經過本人驗證過了的。

參考:http://blog.sina.com.cn/s/blog_ad64b8200102vnxl.html


// 需要修改的地方

1. Error:(14, 0) Error: NDK integration is deprecated in the current plugin.  Consider trying the new experimental plugin.  For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental.  Set "android.useDeprecatedNdk=true" in grad

解析:這是因爲版本升級了,之前的plugin不能用了,直接看提示就行了。

具體可以看http://stackoverflow.com/questions/31979965/after-updating-android-studio-to-version-1-3-0-i-am-getting-ndk-integration-is


JNI實現回調| JNI調用JAVA函數|參數和返回值的格式

http://blog.csdn.net/stefzeus/article/details/6721346


android-studio裏面使用stlport_static的方法

在以前eclipse裏面使用stl的時候,我們都知道只要在Application.mk裏面添加APP_STL := stlport_static就可以了。
開始這招在Android-studio裏面不好使了。

而需要在build.gradle(Module:app)裏面添加對stlport_static的引用了。
具體位置:http://bbs.csdn.net/topics/391886719


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章