新建项目时默认引入的v7依赖包冲突implementation 'com.android.support:appcompat-v7:27.1.1'

新建项目时默认引入的v7依赖包冲突implementation 'com.android.support:appcompat-v7:27.1.1'_第1张图片 

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 25.3.0. Examples include com.android.support:animated-vector-drawable:27.1.1 and com.android.support:design:25.3.0 less... (Ctrl+F1) 
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.)

若按提示加入

//noinspection GradleCompatible

 编译不会出现问题但在调试的时候就会报错

看提示应该是com.android.support:design版本和com.android.support:appcompat中显示的版本冲突,这时候把design版本置换即可,在dependencies中加入:

implementation 'com.android.support:design:27.1.1'

 

你可能感兴趣的:(开发)