Android之開啟專案的經驗(二)
阿新 • • 發佈:2018-12-16
若你的專案開啟成功,但是在編譯執行的時候報出這個錯誤: 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 } } }