我在使用Android Studio 3.0.1时,遇到了一些使用SNAPSHOT依赖项的问题。我也尝试过Android Studio 3.1,但问题仍然存在。
我是通过以下方式包含依赖项的:
dependencies {
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
}
implementation('com.example:lib:0.0.1-SNAPSHOT') { changing = true }
}
当库的新版本发布后,如果我点击“刷新所有Gradle项目”图标,应用程序可以正常构建。然而,Android Studio没有看到快照中所做的任何更改。
我已经尝试重新启动Android Studio并使其无效缓存,但没有任何区别。
如何让Android Studio知道这些变化?
configurations.all
块是否应该放在dependencies
块之外? - clownba0t