来自模块的注释依赖性不起作用

annotation dependency from module not working

build.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配置块中定义如下:

dependencies {
    implementation 'com.android.support:support-annotations:23.1.1'
} 

dependencies userguide 中阅读有关此内容的 mir。

resolutionStrategy 相比之下,用于控制在与其他 use cases 旁边发生版本冲突(传递依赖)时使用哪个版本的特定依赖项。