问题
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