我在build.gradle文件中看到一个错误消息,指出我的应用中的android库。依赖性块如下所示:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.beloo.widget:ChipsLayoutManager:0.3.7@aar'
}
我看到的信息是:
all com.android.support libraries must use the exact same version specification
显然,版本27.0.2和21.0.3
Found versions 27.0.2, 21.0.3. Examples include com.android.support:animated-vector-drawable:27.0.2 and com.android.support:support-v4:21.0.3 less... (⌘F1)
答案 0 :(得分:1)
覆盖旧LIB
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.beloo.widget:ChipsLayoutManager:0.3.7@aar'
//overwrite old LIB
compile 'com.android.support:support-v4:27.0.2'
}