What is the difference between Sync project with gradle files and Sync with File System?

醉酒当歌 提交于 2021-02-11 14:15:04

问题


I have been through various answers with respect to the Sync project with Gradle files. But I couldn't find the major difference between Gradle Files and File System.

For making/building a project, we need to sync the project with Gradle files. But does it need to be done when are we using the Sync using File system?


回答1:


sync project with gradle files updates the Android Studio project model to match the contents of the Gradle build file.

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.

And sync with file updates the projects if some new files or directories are added or removed and project does not sync with this

The working seems same but this is the basic diffrence




回答2:


In android studio when update comes project sync is necessary to work properly

If you working project then update android studio or update gradle dependencies you will need sync project with gradle files starting with Android Studio 3.1, the menu path is File -> Sync Project with Gradle Files OLD go Tools -> Android -> Sync Project with Gradle Files

If you update the project files added or removed files you will need **sync with file system ** File -> Sync with Files System



来源:https://stackoverflow.com/questions/59265034/what-is-the-difference-between-sync-project-with-gradle-files-and-sync-with-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!