Android AutoValue Gson扩展未创建AutoValuesOnTypeAdapterFactory

Android AutoValue Gson扩展未创建AutoValuesOnTypeAdapterFactory,android,gson,auto-value,Android,Gson,Auto Value,我试图使用AutoValuesOnTypeAdapterFactory,但从未生成该类。这是我的实现 @AutoValue public abstract class Foo { public abstract String bar(); @SerializedName("Baz") abstract String baz(); public abstract int quux(); public static TypeAdapter<Foo> typ

我试图使用AutoValuesOnTypeAdapterFactory,但从未生成该类。这是我的实现

@AutoValue
public abstract class Foo {
    public abstract String bar();
    @SerializedName("Baz") abstract String baz();
    public abstract int quux();
    public static TypeAdapter<Foo> typeAdapter(Gson gson) {
        return new AutoValue_Foo.GsonTypeAdapter(gson);
   }
}

//Gson
compile "com.google.code.gson:gson:2.8.0"
//AutoValue
apt "com.google.auto.value:auto-value:1.3"
apt "com.ryanharter.auto.value:auto-value-gson:0.4.5"
provided "com.ryanharter.auto.value:auto-value-gson:0.4.5"
@AutoValue
公共抽象类Foo{
公共抽象字符串条();
@SerializedName(“Baz”)抽象字符串Baz();
公共摘要int-qux();
公共静态类型适配器类型适配器(Gson Gson){
返回新的AutoValue\u Foo.GsonTypeAdapter(gson);
}
}
//格森
编译“com.google.code.gson:gson:2.8.0”
//自动值
apt“com.google.auto.value:auto-value:1.3”
apt“com.ryanharter.auto.value:auto-value-gson:0.4.5”
提供“com.ryanharter.auto.value:auto-value-gson:0.4.5”

typeAdapter方法有一个警告“从未使用过”,并且从未生成AutoValuesOnTypeAdapterFactory

似乎在版本0.4.0之前,
AutoValuesOnTypeAdapterFactory
是自动生成的


现在建议的方法是为所有用
@GsonTypeAdapterFactory
注释的
自动值gson
类创建一个
TypeAdapterFactory
实现。阅读
自动值gson
文档。

似乎在版本0.4.0之前,
自动值gsontypeadapterfactory
是自动生成的


现在建议的方法是为所有用
@GsonTypeAdapterFactory
注释的
自动值gson
类创建一个
TypeAdapterFactory
实现。阅读
自动值gson
文档。

自动值:gson扩展现在要求您使用
@GsonTypeAdapterFactory
注释类,因为自动生成解决方案不支持多个模块项目


您可以在中找到详细信息。

AutoValue:Gson扩展现在要求您使用
@GsonTypeAdapterFactory
注释类,因为自动生成解决方案不支持多个模块项目

您可以在中找到详细信息