How to “Link to alternative location (Linked Folde

2019-07-19 06:41发布

问题:

I have Eclipse project with jni folder and in the jni folder I link a folder (named CDVS_evaluation_framework) with my native C++ classes. How to do the same in Android Studio without copy all CDVS_evaluation_framework folder (under control version) ? thanks a lot.

回答1:

Unfortunatelly IntelliJ IDEA doesn't have feature of creating links.

I think that you need to add a content root to your module. Just right-click on your application and choose "Open Module Settings" option (or press F4 on your keyboard). After that in section Project Settings->Modules Click + Add Content Root and specify your JNI-stuff directory.

Other way is to modify build.gradle file to make it possible to find the root directory of your JNI code.