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.youkuaiyun.com/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.youkuaiyun.com/topics/391886719