Import javax.annotation.concurrent.ThreadSafe failed

android studio

Android studio compilation suddenly reported an error and could not find the class file of javax.annotation.concurrent.NotThreadSafe

I checked it and found that there was no package jsr305, and no way to download this package was found on the Internet. Finally, a solution was found in Fresco's Sample code:

    dependencies {
    //找不到javax.annotation.concurrent.NotThreadSafe的类文件 bug
    provided "com.google.code.findbugs:jsr305:1.3.9"
    }

Add in dependencies, and then recompile.

Download the jar file manually:

http://mirrors.ibiblio.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar

android source code

Ajvax.annotation.concueenrt.ThreadSafe is imported into the code of the android system, saying that the import failed,
android.mk or android.bp, add the dependency of jsr305.

Guess you like

Origin blog.csdn.net/yao_zhuang/article/details/108836518