Google の @AutoValue を使用しようとしました。しかし、Intellij では動作しません。
Step.1このクラスになりました
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();
}
それから
Step.2は、このコードを build.gradle に入力しました
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile group: 'com.google.auto.value', name: 'auto-value', version: '1.2'
}
Step.3 AutoValue プラグインをインストールしました。
しかし、Javaコンパイラは私にこのエラーを与えます:
Error:(12, 20) java: cannot find symbol
symbol: class AutoValue_Animal
location: class Animal