在build.gradle文件中添加以下代码:
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.1'
}
}
这个问题通常是由于库之间的版本冲突引起的,添加上面的代码会把所有的库都强制使用相同的版本,以消除冲突。 在示例代码中,我们将强制使用版本为27.1.1的支持库v4。可以更改指定的库和版本来满足你的需求。
上一篇:AndroidStudio:Cause:unabletofindvalidcertificationpathtorequestedtarget
下一篇:AndroidStudio:ClosingWebViewcausesotherbuttonstolosefunctionality