I try to use Dagger 2, but I've got a errors. Adding code below doesn't help me.
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "500" // or whatever number you want
}
}
My build.gradle (:app) looks like
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
...
dependencies {
compile 'com.google.dagger:dagger:2.23.2'
compile 'com.google.dagger:dagger-android:2.23.2'
compile 'com.google.dagger:dagger-android-support:2.23.2'
annotationProcessor 'com.google.dagger:dagger-compiler:2.23.2'
annotationProcessor 'com.google.dagger:dagger-android-processor:2.23.2'
compile 'me.tatarka.bindingcollectionadapter:bindingcollectionadapter:1.3.0'
}
I use compileSdkVersion set to 26, Gradle Wrapper set to 3.5 and Android Gradle Build Tools set to 2.2.3.
Errors:
C:\Projects\xxx\app\src\main\java\pl\xxx\view\activity\MainActivity.java:31: error: package pl.xxx.databinding does not exist
import pl.xxx.databinding.ActivityMainBinding;
^
C:\Projects\xxx\app\src\main\java\pl\upos\xxx\view\activity\MainActivity.java:52: error: cannot find symbol
private ActivityMainBinding binding;
^
symbol: class ActivityMainBinding
location: class MainActivity