compile 'com.android.support:multidex:1.0.1' happened wrong: all com android support libraries must use the exact same version

前端 未结 4 1911
梦如初夏
梦如初夏 2021-02-13 20:57

Today, I update my Android studio to 2.3, and I update gradle to 3.4.1. But when I build my project, an error occurred: This is the error So I add \" buildToolsVersion \'25.0.0\

相关标签:
4条回答
  • 2021-02-13 21:27

    Change version of com.android.support:recyclerview-v7 and com.android.support:support-core-utils to 25.2.0 (last version of support library: https://developer.android.com/topic/libraries/support-library/revisions.html)

    0 讨论(0)
  • 2021-02-13 21:32

    it's an unnecessary warning for the support:multidex, add this:

    //noinspection AndroidLintGradleCompatible
    compile 'com.android.support:multidex:1.0.1'
    
    0 讨论(0)
  • 2021-02-13 21:32

    I'm also using updated Studio. You should use each library with the same version in order to avoid the Manifest Merger issue. Like this.

     // To Support Design, CardView and RecyclerView Library
    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support:design:25.2.0'
    compile 'com.android.support:recyclerview-v7:25.2.0'
    compile 'com.android.support:cardview-v7:25.2.0'
    compile 'com.android.support:palette-v7:25.2.0'
    
    // To Support MultiDex
    compile 'com.android.support:multidex:1.0.1'
    

    Here you will notice that each library have the same version.

    0 讨论(0)
  • 2021-02-13 21:50

    This is probably an issue with Android Studio 2.3. There's a new inspection that checks if all dependencies of com.android.support use the same version number. However, multidex doesn't have a matching version number. You can disable the inspection via the red light bulb icon next to it as a work-around for now

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