当前位置: 代码迷 >> Android >> Migrating to Android Studio
  详细解决方案

Migrating to Android Studio

热度:56   发布时间:2016-04-28 00:31:12.0
翻译 Migrating to Android Studio

Migrating to Android Studio

迁移项目到Android Studio

?

See also

  • IntelliJ FAQ on migrating to IntelliJ IDEA
  • Eclipse Compatibility Mode
  • FAQ on Migrating

If you have been using?Eclipse with ADT, be aware that?Android Studio?is now the official IDE for Android, so you should migrate to Android Studio to receive all the latest IDE updates.

?

如果你已经用带有ADT的Eclipse,而现在希望用Android Studio作为自己开发Android的IDE,因此你应该把项目迁移到最近更新的Android Studio

?

To migrate existing Android projects, simply import them using Android Studio:

迁移已经存在的Android项目,仅用AndroidStudio便可导入它们

?

  1. In Android Studio, from the main menu or the?Welcome to Android Studiopage, choose?File > Import Project.
  2. Select the Eclipse root project directory and click?OK.

    Note:?The Eclipse root directory must contain the?AndroidManifest.xml?file. Also, the root directory must contain either the?.project?and?.classpath?files from Eclipse or the?res/?and?src/?directories.

  3. Follow the steps in the import wizard.

Android Studio imports the current dependencies, downloads libraries, and creates an Android Studio project with the imported Eclipse project as the main module. Android Studio also creates the required Gradle build files.

The import process replaces any JAR files and libraries with Gradle dependencies, and replaces source libraries and binary libraries with Maven dependencies, so you no longer need to maintain these files manually.

Note:?If there are references to Eclipse workspace library files, comment them out in the?project.properties?or.classpath?files that you imported from the Eclipse project. You can then add these files in the?build.gradle?file. See?Configuring Gradle Builds.

For more help getting started with Android Studio and the IntelliJ user experience,?learn more about Android Studio?and read?FAQ on Migrating to IntelliJ IDEA

  相关解决方案