Android Studio build error - Multiple dex files define Landroid/support/v4/

前端 未结 11 817
别那么骄傲
别那么骄傲 2020-12-17 08:56

I am unable to build my project in Android Studio. I get the following error:

Error:Android Dex: [RaditazAndroid] Unable to execute DX
Error:Android Dex: [R         


        
11条回答
  •  庸人自扰
    2020-12-17 09:35

    I had same issue in Android Studio 2.3, in my case I had a mixture of version numbers which threw the build out, I changed:

    dependencies {
        compile 'com.google.android.gms:play-services-wearable:7.5.0'
        compile 'com.google.android.gms:play-services-analytics:7.5.0'
        compile 'com.google.android.gms:play-services-drive:8.4.0'
    }
    

    to

    dependencies {
        compile 'com.google.android.gms:play-services-wearable:8.4.0'
        compile 'com.google.android.gms:play-services-analytics:8.4.0'
        compile 'com.google.android.gms:play-services-drive:8.4.0'
    }
    

提交回复
热议问题