Expected Results
Java classes for the models in schema.graphql
are created.
Actual Results I get this message:
Error: No AppSync API configured. Please add an API
What I have tried
As suggested in the Amplify API documentation, have tried to execute amplify codegen models
from the project directory.
As suggested in the Amplify Getting Started guide, I have tried to execute the Gradle modelgen
task from Android Studio.
Information About the Project
Executing amplify status
shows the AppSync API is configured for the project:
Current Environment: dev
| Category | Resource name | Operation | Provider plugin |
| -------- | ----------------------- | --------- | --------------- |
| Api | THIS_IS_MY_RESOURCE NAME| Create | |
GraphQL endpoint: MY_GRAPHQL_ENDPOINT
amplifyconfiguration.json
and awsconfiguration.json
are in app/src/main/res/raw
.
I created the AppSync API from the AWS console and added it to the project with the following commands:
amplify init
amplify add codegen --apiId xxxxxxxxxxx