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?
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With