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