I was trying to compile some code from AOSP (Android Open Source Project), and I ran into this error:
The import javax.annotation cannot be resolved
Caused by this code:
import javax.annotation.concurrent.GuardedBy;
import javax.annotation.concurrent.ThreadSafe;
The solution was actually really easy:
- Go here:
http://mvnrepository.com/artifact/com.google.code.findbugs/jsr305 - In the Version column click on the latest version number
- Click Download ( JAR )
- Copy the downloaded JAR file to the libs folder in your Android project (create the libs folder if it doesn't already exist).
0 comments:
Post a Comment