Migrating From Eclipse Projects

To migrate an Eclipse project to an Android Studio project, you have two options:
  • Importing the Eclipse project directly into Studio. This is the preferred approach, and has numerous advantages:
    • It will detect many source libraries (such as ActionBarSherlock) and binary libraries (e.g. guava.jar), and will replace these with maven dependencies instead, which means you no longer have to maintain the libraries manually
    • It will rewrite the project using the new canonical Android Gradle project structure, which supports instrumentation tests in the same project as the tested code, flavor and build type specific resources, etc
  • Exporting the Eclipse project from Eclipse as a Gradle project.This mechanism is not as flexible (or frequently updated) as the direct Gradle import, but it has two usages:
    • It will let you keep your Gradle project using the same file structure as Eclipse ADT projects (in other words, it does not move files around; everything is kept in place, and a special build.gradle file tells Gradle to look for sources in the old directory structure rather than the new one). This is useful if you want to continue working with both Studio and Eclipse on the same codebase.
    • If your project is doing a lot of Eclipse-specific directory mappings (with path variables, linked resources etc) it's possible that the Android Studio importer can not resolve the paths properly; in that case, try the Eclipse exporter (but please also file a bug so we can fix the importer).

Importing Directly into Android Studio

To import into Android Studio, select File > Import, and then select the directory containing your Eclipse ADT project. A wizard will open and guide you through the rest of the import process. When the project import has finished, it will open up a file called "import-summary.txt" which lists all the steps taken during import and suggestions for next steps. For example, it may note files that were not migrated, it may note missing components in your SDK install, and so on.

Exporting from Eclipse

Open the project in Eclipse, and from there, exportthe project. NOTE: Make sure you are using the latest possible version of Eclipsesince we have fixed issues related to export recently.

【Android Studio】Migrating From Eclipse Projects_第1张图片
Choose the Gradle option:
Proceed through the wizard. When you are done, you can import the build.gradle file into Android Studio.
For more information on customizing your build once you have the basics set up, see the new build system user guide. For additional information, see the build system overview page.

更多相关文章

  1. Android 图片拖动 放大
  2. android 处理图片的工具类
  3. Android 选择图片裁剪,上传
  4. android加载大图片内存问题
  5. android图片异步加载解决步骤
  6. android 大图片拖拽并缩放实现原理
  7. Android 原始下载图片 通过HTTp
  8. Android:下载网络图片
  9. android ScrollView 多张图片之间有空白

随机推荐

  1. Python实现二叉树的三种深度遍历方法!
  2. NFV硬件加速,在困窘中前行…
  3. 光网络市场三巨头:Ciena、华为和诺基亚
  4. 从分层角度HACK网络
  5. 如何保护你的SDN控制器
  6. 深度解析vBRAS演进之路
  7. 重新理解广义SD-WAN——当下解决网络发展
  8. 领域驱动设计(DDD)在百度爱番番的实践
  9. 全息政府行业数据安全解决方案
  10. ODL分布式集群底层实现分析