如何导入具有源代码控制到Android Studio的Eclipse项目在不改变目录结构的摇篮吗? [英] How to import Eclipse project with source control to Android Studio without changing the directory structure to the Gradle one?

查看:248
本文介绍了如何导入具有源代码控制到Android Studio的Eclipse项目在不改变目录结构的摇篮吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有50美誉,所以我不能发表评论:
<一href=\"http://stackoverflow.com/a/24741965/1487317\">http://stackoverflow.com/a/24741965/1487317

I don't have 50 reputation so I can't comment on: http://stackoverflow.com/a/24741965/1487317

如果我按照该链接的解决方案,将在Git仓库的目录结构转换到Android Studio的结构?

If I follow that linked solution, will the directory structure in the git repository be converted to Android Studio structure?

如果不是,我怎么导入Eclipse项目与源代码控制到Android工作室不改变目录结构?

If not, how do I import Eclipse project with source control to Android Studio without changing the directory structure?

推荐答案

是的,下面这将导致在被转换为新结构的目录结构,虽然历史是preserved。

Yes, following that will result in the directory structure being converted to the new structure, although the history is preserved.

为了导入与源代码控制到Android Studio的Eclipse项目,而preserving的目录结构,切勿从Android Studio中导入。

In order to import Eclipse project with source control to Android Studio while preserving the directory structure, do NOT import from Android Studio.

相反,从Eclipse的出口摇篮建立文件。

Instead, export from Eclipse the Gradle build files.

在Eclipse中:


  1. 文件>导出> Android的>生成摇篮构建文件>下一步

  2. 检查所需的项目>下一步

  3. 完成

然后在Android的工作室:

Then in Android Studio:


  1. 导入项目

  2. 导航到Eclipse项目的文件夹导入

  3. 选择的build.gradle 文件的(而不是项目文件夹)

  1. Import project
  2. Navigate to the folder of the Eclipse project to import
  3. Choose the build.gradle file (NOT THE PROJECT FOLDER)

此后,机器人Studio将加载的项目而不改变目录结构。请注意,如果您导入这种方式,Eclipse项目是不可复制的。

After that, Android Studio will load the project without changing the directory structure. Note that if you import this way, the Eclipse project is NOT copied.

这篇关于如何导入具有源代码控制到Android Studio的Eclipse项目在不改变目录结构的摇篮吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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