简体   繁体   English

如何使用项目的命令行执行“Sync Project with Gradle Files”?

[英]How to execute "Sync Project with Gradle Files" using Command line for a project?

I want to sync my project with its dependencies using Windows Command Line.我想使用 Windows 命令行将我的项目与其依赖项同步。 Is there any way to do this?有什么办法吗? I have read a few posts about this problem but none of theme worked.我已经阅读了一些关于这个问题的帖子,但没有一个主题有效。 Can anyone help me?谁能帮我?

"Sync Project with Gradle Files" is only Android Studio's problem. “Sync Project with Gradle Files”只是 Android Studio 的问题。 Android Studio needs to take a look at your project and cache some values. Android Studio 需要查看您的项目并缓存一些值。 It has nothing to do with the actual build, which can be invoked standalone from the command line.它与实际构建无关,可以从命令行独立调用。

When you open the project in Android Studio or when you make any changes to the build script in text editor while the project is opened, you will have to re-sync, so the dialogs, such as Project Structure dialog, show the correct values.当您在 Android Studio 中打开项目或在项目打开时在文本编辑器中对构建脚本进行任何更改时,您将必须重新同步,以便对话框(例如项目结构对话框)显示正确的值。

There's no reason and no way to "Sync [Android Studio] Project with Gradle Files" from command line, and that's fine.没有理由也没有办法从命令行“同步 [Android Studio] 项目与 Gradle 文件”,这很好。 Android Studio does it when needed, or tells you to do it, and nobody else besides Android Studio cares. Android Studio 在需要时执行,或者告诉您执行,除了 Android Studio 之外没有其他人关心。

I want to sync my project with its dependencies using Windows Command Line.我想使用 Windows 命令行将我的项目与其依赖项同步。 Is there any way to do this?有没有办法做到这一点? I have read a few posts about this problem but none of theme worked.我已经阅读了一些关于这个问题的帖子,但没有一个主题有效。 Can anyone help me?谁能帮我?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM