Android Studio 3.1: mixing versions can lead to runtime crashes

后端 未结 10 1034
北荒
北荒 2021-02-07 05:11

Have recently upgraded to Android Studio 3.1, and at the same time I\'m trying the Android P preview.

I\'m getting the following error on compiling:

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-07 06:10

    You need to override the conflicted libraries by adding the conflicted libraries to your dependencies block. For example, from your error log you'll find the following:

    Found versions 28.0.0-alpha1, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0-alpha1 and com.android.support:support-media-compat:26.1.0 less...

    You can remove the error by adding the libraries with something like this:

    dependencies {
       implementation 'com.android.support:animated-vector-drawable:28.0.0-alpha1`
       implementation 'com.android.support:support-media-compat:28.0.0-alpha1`
    }
    

提交回复
热议问题