Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to sync gradle with terminal

Android studio sync build.gradle is so slow, this is a part of log:

:app:incrementalApkFlavorReleaseUnitTestJavaCompilationSafeguard UP-TO-DATE
:app:preApkFlavorReleaseUnitTestBuild UP-TO-DATE
:app:prepareApkFlavorReleaseUnitTestDependencies
:app:compileApkFlavorReleaseUnitTestJavaWithJavac UP-TO-DATE
:app:processApkFlavorReleaseUnitTestJavaRes UP-TO-DATE
:app:compileApkFlavorReleaseUnitTestSources UP-TO-DATE
:app:assembleApkFlavorReleaseUnitTest
:app:testApkFlavorReleaseUnitTest UP-TO-DATE
:app:incrementalPluginFlavorDebugUnitTestJavaCompilationSafeguard UP-TO-DATE
:app:prePluginFlavorDebugUnitTestBuild UP-TO-DATE
:app:preparePluginFlavorDebugUnitTestDependencies
:app:compilePluginFlavorDebugUnitTestJavaWithJavac UP-TO-DATE
:app:processPluginFlavorDebugUnitTestJavaRes UP-TO-DATE
:app:compilePluginFlavorDebugUnitTestSources UP-TO-DATE
:app:assemblePluginFlavorDebugUnitTest
:app:testPluginFlavorDebugUnitTest UP-TO-DATE
:app:incrementalPluginFlavorReleaseUnitTestJavaCompilationSafeguard UP-TO-DATE
:app:prePluginFlavorReleaseUnitTestBuild UP-TO-DATE
:app:preparePluginFlavorReleaseUnitTestDependencies
:app:compilePluginFlavorReleaseUnitTestJavaWithJavac UP-TO-DATE
:app:processPluginFlavorReleaseUnitTestJavaRes UP-TO-DATE
:app:compilePluginFlavorReleaseUnitTestSources UP-TO-DATE
:app:assemblePluginFlavorReleaseUnitTest
:app:testPluginFlavorReleaseUnitTest UP-TO-DATE
:app:test UP-TO-DATE
:app:check
:app:build

BUILD SUCCESSFUL

it will build all flavor ,do check , etc.. I was very hurt, you never know how hard one gay from China want to build a project. the slow DNS, the netwok limit.. Pzzzz.. my heart..oh..

So, what can i do with terminal , is there a task do sync ? I don't want do any redundant task. By the way , can I see the source code of android studio sync ? can i configure it?

like image 567
zpy Avatar asked Nov 16 '16 08:11

zpy


People also ask

How do you sync Gradle in terminal?

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.

Why is my Gradle not syncing?

In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.


1 Answers

With command line in your root project

./gradlew build

It will sync and build your app

To see all available gradle task, use ./gradlew tasks

like image 180
Sachin Saxena Avatar answered Sep 30 '22 15:09

Sachin Saxena