Executing tasks: [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:assembleDebug]
Parallel execution with configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. :app:clean :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareAsiaIvityAndroidMarqueeview115Library :app:prepareComAndraskindlerParallaxviewpagerParallaxviewpager031Library :app:prepareComAndroidSupportAnimatedVectorDrawable2321Library :app:prepareComAndroidSupportAppcompatV72321Library :app:prepareComAndroidSupportMultidex101Library :app:prepareComAndroidSupportRecyclerviewV72321Library :app:prepareComAndroidSupportSupportV42321Library :app:prepareComAndroidSupportSupportVectorDrawable2321Library :app:prepareComGithubTecheryProgresshintLibrary023Library :app:prepareComGithubTecheryProgresshintLibraryAddition023Library :app:prepareComH6ah4iAndroidWidgetVerticalseekbarVerticalseekbar051Library :app:prepareComOgaclejapanSmarttablayoutLibrary160Library :app:prepareComToxicBakeryViewpagerTransformsViewPagerTransforms1232Library :app:prepareDebugDependencies :app:compileDebugAidl :app:compileDebugRenderscript :app:generateDebugBuildConfig :app:mergeDebugShaders :app:compileDebugShaders :app:generateDebugAssets :app:mergeDebugAssets :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources :app:mergeDebugResources :app:processDebugManifest :app:processDebugResources :app:generateDebugSources :app:preDebugAndroidTestBuild UP-TO-DATE :app:prepareComAndroidSupportMultidexInstrumentation101Library :app:prepareDebugAndroidTestDependencies :app:compileDebugAndroidTestAidl :app:processDebugAndroidTestManifest :app:compileDebugAndroidTestRenderscript :app:generateDebugAndroidTestBuildConfig :app:mergeDebugAndroidTestShaders :app:compileDebugAndroidTestShaders :app:generateDebugAndroidTestAssets :app:mergeDebugAndroidTestAssets :app:generateDebugAndroidTestResValues UP-TO-DATE :app:generateDebugAndroidTestResources :app:mergeDebugAndroidTestResources :app:processDebugAndroidTestResources :app:generateDebugAndroidTestSources :app:preDebugUnitTestBuild UP-TO-DATE :app:prepareDebugUnitTestDependencies :app:mockableAndroidJar UP-TO-DATE :app:incrementalDebugJavaCompilationSafeguard :app:compileDebugJavaWithJavac :app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugNdk UP-TO-DATE :app:compileDebugSources :app:buildInfoDebugLoader :app:transformClassesWithExtractJarsForDebug :app:transformClassesWithInstantRunVerifierForDebug :app:transformClassesWithJavaResourcesVerifierForDebug UP-TO-DATE :app:mergeDebugJniLibFolders :app:transformNative_libsWithMergeJniLibsForDebug :app:processDebugJavaRes UP-TO-DATE :app:transformResourcesWithMergeJavaResForDebug :app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug UP-TO-DATE :app:transformClassesWithInstantRunForDebug :app:transformClasses_enhancedWithInstant+reloadDexForDebug :app:incrementalDebugTasks :app:prePackageMarkerForDebug :app:fastDeployDebugExtractor :app:generateDebugInstantRunAppInfo :app:coldswapKickerDebug :app:transformClassesWithInstantRunSlicerForDebug :app:transformClassesWithDexForDebug To run dex in process, the Gradle daemon needs a larger heap. It currently has approximately 11833 MB. For faster builds, increase the maximum heap size for the Gradle daemon to more than 13312 MB. To do this set org.gradle.jvmargs=-Xmx13312M in the project gradle.properties. For more information see https://docs.gradle.org/current/userguide/build_environment.html :app:validateDebugSigning :app:packageDebug :app:zipalignDebug :app:fullDebugBuildInfoGenerator :app:assembleDebug
BUILD SUCCESSFUL
Total time: 7 mins 41.523 secs

- 353
- 1
- 6
- 19
-
http://stackoverflow.com/questions/16775197/building-and-running-app-via-gradle-and-android-studio-is-slower-than-via-eclips – Amit Vaghela May 17 '16 at 11:57
-
My problem is solved.It was taking time because i have ubuntu and i was opening and running my project from external ntfs hard drive.I reformatted it as ext4 and followed the given post which reduced the **build time** to **2 sec** from 7 min – user6265154 May 20 '16 at 11:24
3 Answers
The default Gradle Daemon VM memory allocation is 1 gigabyte — which is insufficient to support dexInProcess, so to take advantage you’ll need to set it to at least 2 gigabytes.
One thing you could do to speed up your builds is to increase the Gradle Daemon VM memory allocation.
In gradle.properties
add the line org.gradle.jvmargs=-Xmx2048m
.
Good read about Android Studio 2.1 feature Dex In Process:
And also check out the video:

- 2,398
- 4
- 19
- 33
-
1A link to a potential solution is always welcome, but please [add context around the link](http://meta.stackoverflow.com/a/8259/169503) so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. Take into account that being _barely more than a link to an external site_ is a possible reason as to [Why and how are some answers deleted?](http://stackoverflow.com/help/deleted-answers). – Jonas Czech May 17 '16 at 13:46
-
1

- 3,615
- 2
- 27
- 50
-
That's hardly a solution considering you will need it to go online at times – Tim May 17 '16 at 11:55
-
My problem is solved.It was taking time because i have ubuntu and i was opening and running my project from external ntfs hard drive.I reformatted it as ext4 and followed the post given in comment section by **Amit Vaghela** , which reduced the build time from 7 min to **2 sec** – user6265154 May 20 '16 at 11:26
My problem is solved.It was taking time because i have ubuntu and i was opening and running my project from external ntfs hard drive.I reformatted it as ext4 and followed the post given in comment section by Amit Vaghela , which reduced the build time from 7 min to 2 sec.
This is the link given by 'Amit Vaghela':
Building and running app via Gradle and Android Studio is slower than via Eclipse

- 1
- 1

- 353
- 1
- 6
- 19