Android com.android.support 版本不一致

Android 引入的第三方的包出现support版本冲突的问题:

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). 
Found versions 28.0.0, 27.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and  com.android.support:exifinterface:27.1.0 
Inspection info:There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs.
 One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion).

我们可以这样处理:


    // picasso po
    implementation('com.squareup.picasso:picasso:2.71828') {
        exclude group: 'com.android.support'
    }

Android gradle provided、implementation等指令注意点

注意compile是和api对应的,效果相同。
implementation 的区别在于对外可见性,而且可以加快编译速度(原理在于减少不必要的重复编译过程)

A module 依赖 B module,B 依赖 C module。
Android Studio 2.X使用compile:
A compile B
B compile C
A module不仅可以引用B module,还可以引用C module的接口和类。
Android Studio 3.X使用implementation:
A implementation B
B implementation C
A module只可以引用B module,不可以引用C module。C 对 A 是不可见的!

你可能感兴趣的:(Android,Error,Android,Error,And,Bug,Fixed)