若你的项目打开成功,但是在编译运行的时候报出这个错误:
annotations processors must be explicitly declared now
你只需要在gradle-defaultConfig中添加一句话就可以了:
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
defaultConfig {
applicationId "com.breakloop.httpurlconnectiondemo"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
}