I tried to use Google @AutoValue. But, it does not work on my Intellij.
Step .1 I chose this class
import com.google.auto.value.AutoValue;
@AutoValue
public abstract class Example {
public static Example create(String name, int integer) {
return new AutoValue_Example(name, integer);
}
public abstract String name();
public abstract int integer();
}
then
Step 2 printed this code in the build.gradle file
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile group: 'com.google.auto.value', name: 'auto-value', version: '1.2'
}
Step 3. I had the AutoValue plugin installed.
but Java complier gives me this error:
Error:(12, 20) java: cannot find symbol
symbol: class AutoValue_Animal
location: class Animal
source
share