解决java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.robolectric.annotation.Config.application() Deleting the .gradle folder worked for me too. Odd. Guessing some high level caching going on somewhere 即删除项目工程中的.gradle文件