构建.gradle
configurations.all {
resolutionStrategy {
force 'com.android.support:support-annotations:23.1.1'
}}
异步任务
import android.annotation.MainThread;
import android.annotation.Nullable;
import android.annotation.WorkerThread;
知道为什么上述导入无法解决吗?
最佳答案
免责声明 : 我对Android开发一无所知。
在 Gradle 中,依赖关系在 dependencies
中定义。像这样的配置 block :
dependencies {
implementation 'com.android.support:support-annotations:23.1.1'
}
在 dependencies userguide 中阅读 mir .
resolutionStrategy
相反,用于控制在发生版本冲突的情况下使用特定依赖项的哪个版本(传递依赖项)以及其他 use cases .
关于android - 来自模块的注释依赖不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59342111/