GraphQL-Nullable不是可重复的注释类型

问题描述 投票:0回答:1

我在项目中使用AWS:

implementation('com.amazonaws:aws-android-sdk-appsync:3.0.1')
implementation('org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0')
implementation('org.eclipse.paho:org.eclipse.paho.android.service:1.1.1')
implementation("com.amazonaws:aws-android-sdk-s3:2.16.11")
implementation('com.amazonaws:aws-android-sdk-mobile-client:2.16.3@aar') {
    transitive = true
}
implementation('com.amazonaws:aws-android-sdk-auth-userpools:2.16.3@aar') {
    transitive = true
}

并且面对由于生成的代码中的问题而无法构建应用程序的问题:

package com.amazonaws.amplify.generated.graphql;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
....

public static class ListUsers {
final @Nullable @Nullable List<Item> items;

public ListUsers(@Nonnull String __typename, @Nullable @Nullable List<Item> items,
    @Nullable String nextToken) {
  this.__typename = Utils.checkNotNull(__typename, "__typename == null");
  this.items = items;
  this.nextToken = nextToken;
}

public @Nonnull String __typename() {
  return this.__typename;
}

public @Nullable @Nullable List<Item> items() {
  return this.items;
}

并且由于error: Nullable is not a repeatable annotation type,构建失败

可能是什么原因?可以采取一些解决方法来解决此问题吗?

amazon-web-services android-studio graphql code-generation aws-amplify
1个回答
0
投票

我昨天遇到了完全相同的问题。 AWS Android团队将我的发布请求移至AppSync团队。

您可以在这里跟踪进度:https://github.com/awslabs/aws-mobile-appsync-sdk-android/issues/273#

© www.soinside.com 2019 - 2024. All rights reserved.