【Android Studio】Migrating From Eclipse Projects
来源:互联网 发布:小视频生成器软件 编辑:程序博客网 时间:2024/06/05 01:08
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, export the project. NOTE: Make sure you are using the latest possible version of Eclipse since we have fixed issues related to export recently.
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.
0 0
- 【Android Studio】Migrating From Eclipse Projects
- Migrating Your Android App from Eclipse to Android Studio
- Migrating from Eclipse-移植project到studio失败
- 【Android Studio】Android Studio Migrating Gradle Projects to version 1.0.0
- [转]Migrating From Eclipse to IntelliJ IDEA
- Migrating From Eclipse to IntelliJ IDEA
- 【书籍推荐】Migrating to Swift from Android
- Eclipse Import Projects from Git
- Importing Projects to Android Studio
- 从LM3S到LM4F TM4C ARM Cortex-M4 : Migrating Software Projects from StellarisWare® to TivaWare™
- Migrating from VC6 to VC9
- Android Studio Library projects cannot set applicationId
- android studio导入eclipse的library/ import libraries from eclipse to android studio
- zend studio for eclipse 老是 building php projects
- Managing Projects from the Command Line(android官网文档)
- Migrating from 1.0.x to 1.5 Stable
- Migrating from HttpClient 3.1 to HttpClient 4.0
- Migrating Databases To and From ASM with
- NSFileHandle简析以及实现超大文件的复制
- 字符变量的输入输出
- Eclipse开发快捷键
- Android开发在路上:少去踩坑,多走捷径
- 页面中插入百度地图(利用百度地图API)
- 【Android Studio】Migrating From Eclipse Projects
- Unique Binary Search Trees II
- execute、executeQuery、executeUpdate
- 转换字母
- 日经社説 20141215 「多弱」による勝利に慢心は許されぬ
- android vnc
- Spring3.2 HelloWorld
- 索引文件的并发访问和线程安全性
- XML解析