什么是“同步项目与 Gradle 文件"?真正的意义? [英] What does "Sync Project with Gradle File " really mean?

查看:51
本文介绍了什么是“同步项目与 Gradle 文件"?真正的意义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android Studio中有一个按钮Sync Project with Gradle File,我一直在用,很有用.它会下载依赖包,也许还有更多.

In Android Studio there is a button Sync Project with Gradle File, I always use it, and it's useful. It will download dependence packages and maybe something more.

但这到底是什么意思?

gradlew中是否有对应的命令?

如果我只使用 gradle 开发应用程序,没有 IDE,我应该使用什么命令?

If I develop an app just using gradle, NO IDE, what commnd should I use ?

推荐答案

按钮的功能如它所说:它更新 Android Studio 项目模型以匹配 Gradle 构建文件的内容.

The button does what it says: it updates the Android Studio project model to match the contents of the Gradle build file.

没有对应的gradlew命令,因为直接用命令行工作时没有什么可以同步的.当您运行其他 Gradle 命令(例如 compile)时,依赖项将自动更新.

There is no corresponding gradlew command because there is nothing to synchronize when you work with the command line directly. The dependencies will be updated automatically when you run other Gradle commands such as compile.

这篇关于什么是“同步项目与 Gradle 文件"?真正的意义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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