Android Studio:从 G​​radle 导入项目 [英] Android Studio: import project from Gradle

查看:24
本文介绍了Android Studio:从 G​​radle 导入项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的 android 项目(在 4 个月前用 Android Studio 创建)导入我的新笔记本电脑和 Android Studio.因此,当我选择项目所在的文件夹时,会弹出一个带有不同选项的从 Gradle 导入项目";默认情况下选择使用本地 gradle 分发".

I want to import my android project (created with Android Studio there are 4 months ago) to my new laptop with Android Studio. So when I select the folder where my project is, a pop-up appears "Import project from Gradle" with different options; by default "Use local gradle distribution" is selected.

但我不知道如何在我的笔记本电脑上获取 Gradle 主路径.

But I don't know how to get the Gradle home path on my laptop.

环境:

  • MacOSx
  • Android Studio v0.8.6(测试版)

推荐答案

你有安装 gradle 吗?如果没有,遵循指南会有所帮助.

Do you have gradle installed? If not, following this guide will help.

理想情况下,您不想选择从 Gradle 导入项目"选项 - 您应该使用与项目一起创建的 gradle 包装器.如果没有 gradle 包装器,请创建一个新项目并将 gradle 包装器复制过来.

Ideally you don't want to select the "Import project from Gradle" option though - you should be using the gradle wrapper created with the project. If there is no gradle wrapper, create a new project and copy the gradle wrapper across.

gradle 包装器将为项目下载正确的 gradle 版本,并避免需要在本地安装 gradle.

The gradle wrapper will download the correct gradle version for the project, and avoids the need to have gradle installed locally.

这篇关于Android Studio:从 G​​radle 导入项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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