自动将项目迁移到 Android Studio 中的 gradle [英] Automatically Migrating projects to gradle in Android studio

查看:36
本文介绍了自动将项目迁移到 Android Studio 中的 gradle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我过去用android studio制作了一些应用程序,它们没有问题.我可以从许多站点打开示例项目,例如:developer.android.com/.现在在android studio更新后,我无法在android studio中打开项目而不手动迁移它们,这是由android studio本身在更新之前完成的.现在可能是什么问题?首先,我收到此警告,即检测到 android 框架.然后在选择设置框架并单击确定后,我得到了这个:

I made some apps in the past with android studio, and there was no problems with them. And I could open example projects from many sites, for example: developer.android.com/. Now after an update of android studio, I can't open projects in android studio without migrating them manually, which was done before the update by android studio itself. What could be the problem now? First I get this warning, that android framework is detected. Then after choosing the setup frameworks and clicking ok, I get this:

如您所见,它不是基于 gradle 的项目.怎么做才能让android studio再次自动迁移项目?

As you can see it is not gradle based project. What can I do to make android studio automatically migrate projects again?

推荐答案

在 ANDROID STUDIO 中导入 ANDROID STUDIO 项目:

如果您想导入一个 Android Studio 项目,请执行以下操作:

If you want to import An Android Studio Project then do the following:

1.选择 打开一个现有的 Android Studio 项目

2. 浏览您想要的项目目录.

3. 现在不是选择包含项目的文件夹,而是选择位于项目父文件夹中的 build.gradle 文件.

3. Now rather than selecting the folder that contains your project, you have to select the build.gradle file that is just inside of your parent folder of the project.

它不会产生任何问题,也不会要求您迁移到 gradle 并完全导入任何框架.

It will not create any problem and will not ask you to migrate into gradle and import any framework at all.

在 ANDROID STUDIO 中导入 ECLIPSE 项目:

如果要在 Android Studio 中导入 Eclipse 项目:

If you want to import Eclipse Project in Android Studio:

1. 选择 导入项目(Eclipse ADT、Gradle 等)

2.然后没什么特别的,只需按照向导中的说明进行操作即可.

2. Then nothing special just follow the instructions in the wizard.

这篇关于自动将项目迁移到 Android Studio 中的 gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆