在Android Studio中的何处创建jni文件夹

问题描述:

在Eclipse中,当我需要创建本机android方法时,我在项目的根目录下创建了jni文件夹.我应该在Android Studio项目中的哪个位置创建该文件夹?

In Eclipse I create jni folder at the root of the project when I need to create native android methods. Where should I create this folder in Android Studio project?

项目的结构应该相同,所以我将其放在同一位置.

The structure of the project should be the same, so I'd put it in the same place.

话虽这么说,Android Studio至少还没有C/C ++功能(因为IDEA没有,但是有很大的需求并且他们正在使用它). Intellij目前正在将所有与NDK相关的问题转回给Google.

That being said, Android Studio doesn't have a C/C++ features, at least not yet (because IDEA doesn't have it but there is huge demand for it and they are working it). Intellij is currently referring all NDK related questions back to Google at the moment.

基本上,我认为您需要做的是在Android Studio中创建一个Build任务,以自己调用ndk-build.cmd(或一些外部任务),这并不可怕,但是不会有一个很好的配置屏幕来做.如果我没有道理,请对此做出回应,然后将发布我所谈论内容的屏幕截图.

Basically what I think you'd have to do is make a Build task inside of Android Studio to call the ndk-build.cmd (or some external task) yourself which isnt horrible, but there's not going to be a nice configuration screen to do it. If I'm not making sense, respond to this and I'll post a screen shot of what I'm talking about.