Migrating to Android Studio
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.
To migrate existing Android projects, simply import them using Android Studio:
- In Android Studio, from the main menu or the Welcome to Android Studiopage, choose File > Import Project.
- 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 theres/
andsrc/
directories. - 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
假如你以前是用Eclipse进行开发,想迁移到Android Studio上。你需要导出你的工程,导出的目的是为了生成Gradle文件。然后将导出的工程导入Android Studio即可。
- 从Eclipse导出
1、更新你的Eclipcs的ADT插件(ADT的版本必须大于等于22.0)
2、在Eclipse中,选择Flie->Export
3、弹出的对话框中,点击Android并选择Generate Gradle build files
4、选择你要导出的工程后点击Finish
你选择导出的工程依旧在原来的路径下,只是多了一个为Android Studio准备的build.gradle文件
- 导入到Android Studio中
1、在Android Studio中,关闭你当前的工程。页面会跳到欢迎页面。
2、选择Import Project
3、定位到你想要导入的工程的目录,选择build.gradle文件
4、在弹出来的对话框中,不进行任何更改直接点OK
这时你的工程就被导入到Android Studio中了。
注意:即使工程没有生成build.gradle文件,你也可以导入到Android Studio中。Android Studio也可以使用Ant来进行编译工程。然后,为了更好的使用其他的功能(如:build variants),我们强烈建议你使用ADT插件生成一个gradle文件或者在Android Studio中直接写gradle文件。更多的内容,可以戳这:http://tools.android.com/tech-docs/new-build-system/user-guide。
原文地址:http://developer.android.com/sdk/installing/migrate.html
相关推荐
总的来说,《Migrating to Cloud-Native App Architectures Pivotal》这份文档将深入解析云原生应用架构的理论与实践,为企业和开发者提供宝贵的迁移指南,帮助他们把握云计算的未来趋势,实现数字化转型。...
The primary objective of this book is to help experienced Android developers leap into native iOS–Swift mobile development. It is easier than you think, and this book will make it even easier with ...
Migrating to MariaDB describes the process and lessons learned during a migration from a proprietary database management engine to the MariaDB open source solution. The book discusses the drivers for ...
Of course, a migration from any database is not something to be taken lightly, and so countless organizations are considering their options for migrating to MySQL. In particular, many MySQL customers...
Migrating to Microservices Databases,Migrating to Microservices Databases
Adoption of cloud-native application architectures is helping many organizations transform their IT into a force for true agility in the marketplace. This O’Reilly report defines the unique ...
云计算和微服务架构是当前信息技术领域中变革性的发展方向,它们重新定义了传统软件架构的边界,使得应用设计更加灵活、可扩展,以及更符合现代业务需求的持续集成和持续部署(CI/CD)流程。《迁移到云原生应用架构...
### 迁移至云原生应用架构:关键概念与实践 随着云计算技术的快速发展与广泛应用,越来越多的企业开始寻求转型,以提升其在市场中的竞争力。《迁移到云原生应用架构》这一报告由O'Reilly出版,作者为Matt Stine,...
Migrating to Swift From Web Development gives you the ability to create native iOS apps using the latest Swift programming language. Starting with preparing your latest Xcode 6 Integrated Development ...
Migrating to .NET: A Pragmatic Path to Visual Basic .NET, Visual C++ .NET, and ASP.NET Find out how to migrate your legacy software to the powerful Microsoft .NET framework Provides for a complete,...
Migrating to the Solaris Operating System The Discipline of UNIX to UNIX Migrations 2003
Migrating to Linux with Oracle Applications Release 11i (Doc ID 238276.1)
Great for anyone evaluating or migrating to the latest Microsoft IDE. DevPartner Studio still handles VS2005, VS2008, VS2010, VS2012 and VS2013. Both 64-bit and 32-bit applications, making it easy ...
《.NET For Java Developers:Migrating To C#》是一本专为有Java背景的开发者设计的指南,旨在帮助他们顺利过渡到C#编程环境。这本书由Addison-Wesley出版社出版,是英文版的电子书,对于希望深入理解.NET框架和C#...