android工程从Eclipse迁移到Android Studio
2014-09-07 13:09
465 查看
一个优秀的程序员都需要有查阅官方文档的习惯,这是官方的迁移办法。点击
project into Android Studio.
In Eclipse, select File > Export.
In the window that appears, open
Android and select Generate Gradle build files.
Select the project you want to export for Android Studio and click
Finish.
Your selected project remains in the same location but now contains a
Welcome to Android Studio window.
Click Import Project.
Locate the project you exported from Eclipse, expand it, select the
build.gradle file and click OK.
In the following dialog, leave
Use gradle wrapper selected and click OK. (You do not need to specify the Gradle home.)
Now that your project is imported to Android Studio, read
Tips and Tricks for some help getting started.
Note: It's possible to import an existing Android project to Android Studio even if you don't generate a Gradle build file from Eclipse—Android Studio will successfully
build and run projects using an existing Ant build file. However, in order to take advantage of build variants and other advanced features in the future, we strongly suggest that you generate a Gradle build file using the ADT plugin or write your own Gradle
build file for use with Android Studio. For more information about the Gradle build system, see the
Gradle Plugin User Guide.
Migrating from Eclipse
If you've previously developed for Android using Eclipse and would like to migrate to Android Studio, you should export your projects from Eclipse in order to generate Gradle build files. You can then import yourproject into Android Studio.
Export from Eclipse
Update your Eclipse ADT Plugin (you must have version 22.0 or higher).In Eclipse, select File > Export.
In the window that appears, open
Android and select Generate Gradle build files.
Select the project you want to export for Android Studio and click
Finish.
Your selected project remains in the same location but now contains a
build.gradlefile and is ready for Android Studio.
Import into Android Studio
In Android Studio, close any projects currently open. You should see theWelcome to Android Studio window.
Click Import Project.
Locate the project you exported from Eclipse, expand it, select the
build.gradle file and click OK.
In the following dialog, leave
Use gradle wrapper selected and click OK. (You do not need to specify the Gradle home.)
Now that your project is imported to Android Studio, read
Tips and Tricks for some help getting started.
Note: It's possible to import an existing Android project to Android Studio even if you don't generate a Gradle build file from Eclipse—Android Studio will successfully
build and run projects using an existing Ant build file. However, in order to take advantage of build variants and other advanced features in the future, we strongly suggest that you generate a Gradle build file using the ADT plugin or write your own Gradle
build file for use with Android Studio. For more information about the Gradle build system, see the
Gradle Plugin User Guide.
相关文章推荐
- Android优酷播放器SDK——Eclipse工程迁移Android Studio遇到问题
- 关于Android工程从eclipse迁移至android studio的过程
- Android Eclipse下工程移植到Android Studio详细步骤
- Android Eclipse下工程移植到Android Studio详细步骤
- 将Eclipse工程迁移到Android Stutio
- Android开发随手记录-AS导出jar包 Android Studio生成包含assets的Jar 从Eclipse迁移到Android Studio,并打包指定文件到jar
- 把eclipse工程迁移到Android studio,build成功但run时报butterknife的错,error: duplicate class: class_name$$View(类重复)
- 将已有的Android从Eclipse手动迁移到Android Studio(不用gradle)
- Android eclipse工程导入Android studio注意事项
- Android项目由Eclipse到Android Studio的完美迁移(包含友盟分享、百度统计、ViewPagerIndicat等第三方库文件、Jar包等)——项目迁移二
- Eclipse 工程迁移到 Android Studio
- Android Gradle编译学习日记之二(使用 Gradle 编译 Eclipse,引入依赖资源以及迁移 Android Studio)
- Android项目从Eclipse迁移到Android Studio的过程和一些问题汇总
- 从eclipse到Android studio/迁移eclipse的Android项目到Android studio平台的注意事项
- android工程eclipse转移至android studio中的问题
- Android Gradle编译学习日记之二(使用 Gradle 编译 Eclipse,引入依赖资源以及迁移 Android Studio)
- 从Eclipse到Android Studio:Android项目如何进行迁移
- Eclipse工程迁移到Android studio问题汇总
- Android studio 工程迁移到Eclipse
- Android Studio官方文档之从Eclipse迁移到Android Studio开发篇