Finally found a solution for this by adding this line to gradle.properties.
org.gradle.jvmargs=-Xmx4608m
More Related Contents:
- Building and running app via Gradle and Android Studio is slower than via Eclipse
- Android Studio gradle takes too long to build
- What does “Program type already present” mean?
- Gradle: Execution failed for task ‘:processDebugManifest’
- Using Build Flavors – Structuring source folders and build.gradle correctly
- No matching client found for package name (Google Analytics) – multiple productFlavors & buildTypes
- Android Studio: Gradle – build fails — Execution failed for task ‘:dexDebug’
- Android Studio Gradle Configuration with name ‘default’ not found
- gradle – library duplicates in dependencies
- Android Studio – Importing external Library/Jar
- Version conflict updating to play-services 9.4.0 Android studio 2.2
- Android studio Gradle icon error, Manifest Merger
- findFragmentById for SupportMapFragment returns null in Android Studio
- Error:Cause: unable to find valid certification path to requested target
- Sign APK without putting keystore info in build.gradle
- How to create an Android Library Jar with gradle without publicly revealing source code?
- Gradle and Multi-Project structure
- Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication ?Android
- Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml
- Android Studio: “Execution failed for task ‘:app:mergeDebugResources’” if project is created on drive C:
- Error “Gradle sync failed: Connection refused: connect”
- Android Studio: Android Manifest doesn’t exists or has incorrect root tag
- How to downgrade to older version of Gradle
- Add Maven repository to build.gradle
- Add ViewPagerIndicator to Android Studio
- How to replace a string for a buildvariant with gradle in android studio?
- Gradle failed to sync with ‘unable to find optional library’
- No Cached Version Gradle Plugin Available for offline mode
- Build variants in Gradle for a Library Project in Android
- Importing gradle project to eclipse