如何“链接到替代位置(链接文件夹)”在Android Studio中像Eclipse一样? [英] How to "Link to alternative location (Linked Folder)" in Android Studio like in Eclipse?

查看:384
本文介绍了如何“链接到替代位置(链接文件夹)”在Android Studio中像Eclipse一样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Eclipse项目与 jni 文件夹,并在jni文件夹我链接一个文件夹(名为CDVS_evaluation_framework)与我的本机C ++类。
如何在Android Studio中执行相同的操作,不需要复制所有CDVS_evaluation_framework文件夹(在控制版本下)?
非常感谢。





解决方案

Unfortunatelly IntelliJ IDEA没有创建链接的功能。



我想你需要添加一个内容根到你的模块。只需右键单击应用程序,然后选择打开模块设置选项(或按键盘上的F4)。之后,在项目设置 - > 模块部分,点击 +添加内容根,并指定您的JNI-stuff目录。



其他方法是修改 build.gradle 文件,以便找到JNI代码的根目录。


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.

解决方案

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.

这篇关于如何“链接到替代位置(链接文件夹)”在Android Studio中像Eclipse一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆