Switching to Android Studio with all my existing projects in Eclipse. So what is the procedure to do that.
使用Eclipse中的所有现有项目切换到Android Studio。那么这样做的程序是什么。
5 个解决方案
#1
43
Export from Eclipse
从Eclipse导出
1.Update your Eclipse ADT Plugin (you must have version 22.0 or higher).
1.更新您的Eclipse ADT插件(您必须具有22.0或更高版本)。
2.In Eclipse, select File > Export.
2.在Eclipse中,选择“文件”>“导出”。
3.In the window that appears, open Android and select Generate Gradle build files.
3.在出现的窗口中,打开Android并选择Generate Gradle build files。
4.Select the projects you want to export for Android Studio and click Finish.
4.选择要为Android Studio导出的项目,然后单击“完成”。
Your selected projects remain in the same location but now contain a build.gradle file and are ready for Android Studio.
您选择的项目保留在同一位置,但现在包含build.gradle文件,并且已准备好安装Android Studio。
Import into Android Studio
导入到Android Studio中
1.In Android Studio, select File > Import Project.
1.在Android Studio中,选择“文件”>“导入项目”。
2.Locate a project you exported from Eclipse, select the project's root directory and click OK.
2.找到从Eclipse导出的项目,选择项目的根目录,然后单击“确定”。
3.Select Create project from existing sources and click Next.
3.从现有源中选择Create project,然后单击Next。
4.Follow the walk-through to complete the import process.
4.按照演练完成导入过程。
for more info clickhere
欲了解更多信息请点击这里
some FAQ Eclipse Migration FAQ
一些FAQ Eclipse Migration FAQ
迁移到Android Studio
#2
4
The official release of Android Studio (version 1.0.2 at the time of this writing) now supports importing ADT projects directly. In fact, when trying to export from ADT, there is now a popup that suggests importing directly from Android Studio is a better choice.
Android Studio的正式版本(撰写本文时为1.0.2版)现在支持直接导入ADT项目。事实上,当尝试从ADT导出时,现在有一个弹出窗口,建议直接从Android Studio导入是一个更好的选择。
Just open Android Studio > Import Non-Android Studio Projects > Select your ADT project folder.
只需打开Android Studio>导入非Android Studio项目>选择您的ADT项目文件夹。
It creates a new AS-version of your project, and reports items that need your manual verification.
它会为您的项目创建一个新的AS版本,并报告需要您手动验证的项目。
#3
4
Try these steps for importing an Eclipse project into Android studio:
尝试以下步骤将Eclipse项目导入Android studio:
1- Click on import project (Eclipse ADT, Gradle, etc.).
1-单击导入项目(Eclipse ADT,Gradle等)。
2- Choose the root folder of your project. The folder that contains bin folder.
2-选择项目的根文件夹。包含bin文件夹的文件夹。
3- Choose where you want to import it and click next.
3-选择要导入的位置,然后单击“下一步”。
4- Click on finish.
4-单击完成。
5- Change the view to project.
5-将视图更改为项目。
6- Open build.gradle in your src folder.
6-在src文件夹中打开build.gradle。
7- You should find out your current SDK version. So, click on tools-> Android-> SDK Manager-> Launch standalone SDK Manager and scroll to the bottom.
7-您应该找到您当前的SDK版本。因此,单击工具 - > Android-> SDK Manager->启动独立SDK Manager并滚动到底部。
8- Change your build.gradle based on your SDK version and click try again. For example, mine is 23.1.1.
8-根据SDK版本更改build.gradle,然后再次单击“try”。例如,我的是23.1.1。
If you have any library that is not added automatically please visit https://*.com/a/35369267/5475941 to add it manually.I hope it helps.
如果您有任何未自动添加的库,请访问https://*.com/a/35369267/5475941以手动添加。我希望它有所帮助。
#4
3
Forget the import, just hand build it.
忘记导入,只需手工构建它。
After trying and failing to import the project I did the following hand-import. I gained trust that the export / import procedure didn't leave behind any problems and I gained knowledge of the new build system:
在尝试并且未能导入项目之后,我进行了以下手动导入。我相信出口/进口程序没有留下任何问题,我获得了新构建系统的知识:
- In Android studio create a new blank project
- 在Android studio中创建一个新的空白项目
- Build it out to device to trust that it is working
- 将其构建到设备以确信它正在工作
- Slowly a bit at a time add in your previous code, leaving behind anything specific to the old build system
- 稍微缓慢地添加您以前的代码,留下旧构建系统特有的任何内容
It is a slow process but the debugging is much more focused on your actual code rather than trying to figure out "what the import actually did".
这是一个缓慢的过程,但调试更侧重于您的实际代码,而不是试图找出“导入实际上做了什么”。
#5
1
you may get the answer in this link link
你可以在这个链接链接中得到答案
To import an existing Android app project, click Import Project.
要导入现有的Android应用程序项目,请单击“导入项目”。
Note:
If you previously developed your Android project with Eclipse, you should first use the new export feature in the ADT plugin to prepare your project with the new Gradle build system.
注意:如果您之前使用Eclipse开发了Android项目,则应首先使用ADT插件中的新导出功能,使用新的Gradle构建系统准备项目。
#1
43
Export from Eclipse
从Eclipse导出
1.Update your Eclipse ADT Plugin (you must have version 22.0 or higher).
1.更新您的Eclipse ADT插件(您必须具有22.0或更高版本)。
2.In Eclipse, select File > Export.
2.在Eclipse中,选择“文件”>“导出”。
3.In the window that appears, open Android and select Generate Gradle build files.
3.在出现的窗口中,打开Android并选择Generate Gradle build files。
4.Select the projects you want to export for Android Studio and click Finish.
4.选择要为Android Studio导出的项目,然后单击“完成”。
Your selected projects remain in the same location but now contain a build.gradle file and are ready for Android Studio.
您选择的项目保留在同一位置,但现在包含build.gradle文件,并且已准备好安装Android Studio。
Import into Android Studio
导入到Android Studio中
1.In Android Studio, select File > Import Project.
1.在Android Studio中,选择“文件”>“导入项目”。
2.Locate a project you exported from Eclipse, select the project's root directory and click OK.
2.找到从Eclipse导出的项目,选择项目的根目录,然后单击“确定”。
3.Select Create project from existing sources and click Next.
3.从现有源中选择Create project,然后单击Next。
4.Follow the walk-through to complete the import process.
4.按照演练完成导入过程。
for more info clickhere
欲了解更多信息请点击这里
some FAQ Eclipse Migration FAQ
一些FAQ Eclipse Migration FAQ
迁移到Android Studio
#2
4
The official release of Android Studio (version 1.0.2 at the time of this writing) now supports importing ADT projects directly. In fact, when trying to export from ADT, there is now a popup that suggests importing directly from Android Studio is a better choice.
Android Studio的正式版本(撰写本文时为1.0.2版)现在支持直接导入ADT项目。事实上,当尝试从ADT导出时,现在有一个弹出窗口,建议直接从Android Studio导入是一个更好的选择。
Just open Android Studio > Import Non-Android Studio Projects > Select your ADT project folder.
只需打开Android Studio>导入非Android Studio项目>选择您的ADT项目文件夹。
It creates a new AS-version of your project, and reports items that need your manual verification.
它会为您的项目创建一个新的AS版本,并报告需要您手动验证的项目。
#3
4
Try these steps for importing an Eclipse project into Android studio:
尝试以下步骤将Eclipse项目导入Android studio:
1- Click on import project (Eclipse ADT, Gradle, etc.).
1-单击导入项目(Eclipse ADT,Gradle等)。
2- Choose the root folder of your project. The folder that contains bin folder.
2-选择项目的根文件夹。包含bin文件夹的文件夹。
3- Choose where you want to import it and click next.
3-选择要导入的位置,然后单击“下一步”。
4- Click on finish.
4-单击完成。
5- Change the view to project.
5-将视图更改为项目。
6- Open build.gradle in your src folder.
6-在src文件夹中打开build.gradle。
7- You should find out your current SDK version. So, click on tools-> Android-> SDK Manager-> Launch standalone SDK Manager and scroll to the bottom.
7-您应该找到您当前的SDK版本。因此,单击工具 - > Android-> SDK Manager->启动独立SDK Manager并滚动到底部。
8- Change your build.gradle based on your SDK version and click try again. For example, mine is 23.1.1.
8-根据SDK版本更改build.gradle,然后再次单击“try”。例如,我的是23.1.1。
If you have any library that is not added automatically please visit https://*.com/a/35369267/5475941 to add it manually.I hope it helps.
如果您有任何未自动添加的库,请访问https://*.com/a/35369267/5475941以手动添加。我希望它有所帮助。
#4
3
Forget the import, just hand build it.
忘记导入,只需手工构建它。
After trying and failing to import the project I did the following hand-import. I gained trust that the export / import procedure didn't leave behind any problems and I gained knowledge of the new build system:
在尝试并且未能导入项目之后,我进行了以下手动导入。我相信出口/进口程序没有留下任何问题,我获得了新构建系统的知识:
- In Android studio create a new blank project
- 在Android studio中创建一个新的空白项目
- Build it out to device to trust that it is working
- 将其构建到设备以确信它正在工作
- Slowly a bit at a time add in your previous code, leaving behind anything specific to the old build system
- 稍微缓慢地添加您以前的代码,留下旧构建系统特有的任何内容
It is a slow process but the debugging is much more focused on your actual code rather than trying to figure out "what the import actually did".
这是一个缓慢的过程,但调试更侧重于您的实际代码,而不是试图找出“导入实际上做了什么”。
#5
1
you may get the answer in this link link
你可以在这个链接链接中得到答案
To import an existing Android app project, click Import Project.
要导入现有的Android应用程序项目,请单击“导入项目”。
Note:
If you previously developed your Android project with Eclipse, you should first use the new export feature in the ADT plugin to prepare your project with the new Gradle build system.
注意:如果您之前使用Eclipse开发了Android项目,则应首先使用ADT插件中的新导出功能,使用新的Gradle构建系统准备项目。