com.android.build.transform.api.TransformException

后端 未结 25 2029
独厮守ぢ
独厮守ぢ 2020-11-22 06:14

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         


        
相关标签:
25条回答
  • 2020-11-22 06:38

    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

    0 讨论(0)
  • 2020-11-22 06:38

    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

    0 讨论(0)
  • 2020-11-22 06:46

    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

    0 讨论(0)
  • 2020-11-22 06:46

    If you need add this reference for cordova plugin add next line in your plugin.xml file.

    <framework src="com.android.support:support-v4:+" />
    
    0 讨论(0)
  • 2020-11-22 06:47

    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.

    0 讨论(0)
  • 2020-11-22 06:48

    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.

    0 讨论(0)
提交回复
热议问题