问题:SNAPSHOT依赖gradle默认缓存24小时,在此期间内相同版本只会使用本地资源,在不发布并依赖更高版本的情况下,如何更新SNAPSHOT依赖包?
解决方案:
在app/build.gradle中添加以下内容,Rebuild Project
configurations.all { // check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
implementation('android:xxx:x.x.x.x-SNAPSHOT') { changing = true }
}