I am trying to integrate Google sign in, in my app, I added these libraries:
compile \'com.google.android.gms:play-services-identity:8.1.0\'
compile \'com.go
Try adding multiDexEnabled true
to your app build.gradle file.
defaultConfig {
multiDexEnabled true
}
EDIT:
Try Steve's answer first. In case it happens frequently or first step didn't help multiDexEnabled
might help. For those who love to dig deeper here is couple similar issues (with more answers):
:app:dexDebug ExecException finished with non-zero exit value 2
Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException
I also faced similar issue in Android Studio 1.5.1 and gradle 1.5.0. I just have to remove unwanted libraries from dependencies which may be automatically added in my app's build.gradle file. One was : compile 'com.google.android.gms:play-services:8.4.0'. So for best practices try to only include specific play services library like for ads include only
dependencies {
compile 'com.google.android.gms:play-services-ads:8.4.0'
}
Although
defaultConfig {
multiDexEnabled true
}
this will also solve the issue, but provides with a lot of Notes in gradle console, making it confusing to find the other real issues during build
First Delete intermediates files YOUR APP FOLDER\app\build\intermediates OR Clean your project and then rebuild.
Thent add
multiDexEnabled true
i.e.
defaultConfig {
multiDexEnabled true
}
It's work for me
If you need add this reference for cordova plugin add next line in your plugin.xml file.
<framework src="com.android.support:support-v4:+" />
I solved this issue by adding:
In build.gradle
:
defaultConfig {
multiDexEnabled true
}
in local.properties
,
org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m
mention dependency:
compile 'com.android.support:multidex:1.0.1'
Clean and Rebuild.
If you are using the latest gradle version ie classpath 'com.android.tools.build:gradle:1.5.0' and classpath 'com.google.gms:google-services:1.4.0-beta3'
, then try updating the latest support respository from the SDK manager and rebuild the entire project.