Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Sync Project with Gradle File " really mean?

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.

But what does it really mean?

Is there a corresponding command in gradlew?

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

like image 748
Kassadin Avatar asked Jul 01 '15 16:07

Kassadin


People also ask

What does Sync project with Gradle files do?

Gradle Sync is a Gradle task who's main function is to check all the dependencies in your build. gradle files which are associated with your Android studio project and then download that specified version (if not downloaded already). There are many variations in which this error message might occur.

What does sync Gradle mean?

Gradle sync is a gradle task that looks through all of your dependencies listed in your build. gradle files and tries to download the specified version.

Why does Gradle sync?

Gradle files and your application code need to be synced if any Gradle file changes, for example when updating dependencies or adding new dependencies manually. Android Studio should automatically sync the project with Gradle when you robotify your app (ie make it compatible with Pepper's tablet).

How do you sync a Gradle project?

Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.


1 Answers

The button does what it says: it 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.

like image 188
yole Avatar answered Oct 05 '22 16:10

yole