-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to resolve: aws.sdk.kotlin:smithy-kotlin-runtime #2903
Comments
There are a few issues with the gradle file you have posted. All Amplify versions should be on the same version. Below, you are mixing versions of Amplify.
Please update to 2.22.1 for each. Next, you should not be excluding dependencies from Amplify. If you choose to do this, we can't guarantee Amplify will work. I see you are attempting to manually add Smithy but there is no version listed with it. Amplify dependencies for our latest release can be found here:
|
Duplicate class aws.smithy.kotlin.runtime.hashing.CRC32CImpl found in modules hashing-jvm-0.12.13.jar -> hashing-jvm-0.12.13 (aws.smithy.kotlin:hashing-jvm:0.12.13) and runtime-core-jvm-1.0.11.jar -> runtime-core-jvm-1.0.11 (aws.smithy.kotlin:runtime-core-jvm:1.0.11) Go to the documentation to learn how to Fix dependency resolution errors. |
That is coming from mixing different versions of Amplify dependencies. You should not have to have any excludes (nor should you have to explicitly import Smithy. Please attempt to upgrade Amplify libraries, remove excludes, and remove the smithy import. If you are still having issues, please reach out with your updated gradle file. |
Haven't heard from the requester in 2 weeks after providing next steps. We're going to assume that all is working so will close this issue. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Before opening, please confirm:
Language and Async Model
Kotlin
Amplify Categories
GraphQL API
Gradle script dependencies
plugins {
id("org.jetbrains.kotlin.android") version "1.9.25"
id("com.android.application") version "8.5.2"
}
android {
compileSdk = 34
namespace = "eu.tutorials.gsmtach"
}
dependencies {
// Compose & UI Libraries
implementation("androidx.compose.ui:ui:1.6.8")
implementation("androidx.compose.material:material:1.6.8")
implementation("androidx.compose.material3:material3:1.0.0")
implementation("androidx.compose.material:material-icons-core:1.6.8")
implementation("androidx.compose.material:material-icons-extended:1.6.8")
implementation("androidx.compose.ui:ui-graphics:1.6.8")
implementation("androidx.constraintlayout:constraintlayout-compose:1.0.1")
implementation("androidx.activity:activity-compose:1.7.2")
implementation("androidx.navigation:navigation-compose:2.6.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2")
implementation("io.coil-kt:coil-compose:2.4.0")
implementation("com.airbnb.android:lottie-compose:6.1.0")
}
Environment information
Gradle 8.7
Build time: 2024-03-22 15:52:46 UTC
Revision: 650af14d7653aa949fce5e886e685efc9cf97c10
Kotlin: 1.9.22
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 17.0.11 (OpenLogic 17.0.11+9-adhoc..jdk17u)
OS: Windows 11 10.0 amd64
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
How much is the latest version?
Reproduction steps (if applicable)
No response
Code Snippet
package eu.tutorials.gsmtach
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.services.dynamodb.DynamoDbClient
import software.amazon.awssdk.services.dynamodb.DynamoDbClientBuilder
import software.amazon.awssdk.http.urlconnection.UrlConnectionHttpClient
object AwsConfig {
}
Log output
amplifyconfiguration.json
{
"UserAgent": "aws-amplify-cli/2.0",
"Version": "1.0",
"api": {
"plugins": {
"awsAPIPlugin": {
"gsmtach": {
"endpointType": "GraphQL",
"endpoint": "https://y5frmj343ne6te3i2aiscyqexy.appsync-api.us-east-1.amazonaws.com/graphql",
"region": "us-east-1",
"authorizationType": "API_KEY",
"apiKey": "xxxxxxxxxxxxxpxv3hqwvfzi"
}
}
}
},
"auth": {
"plugins": {
"awsCognitoAuthPlugin": {
"UserAgent": "aws-amplify-cli/0.1.0",
"Version": "0.1.0",
"IdentityManager": {
"Default": {}
},
"AppSync": {
"Default": {
"ApiUrl": "https://y5frmj343ne6te3i2aiscyqexy.appsync-api.us-east-1.amazonaws.com/graphql",
"Region": "us-east-1",
"AuthMode": "API_KEY",
"ApiKey": "xxxxxxxxxxzi",
"ClientDatabasePrefix": "gsmtach_API_KEY"
},
"gsmtach_AMAZON_COGNITO_USER_POOLS": {
"ApiUrl": "https://y5frmj343ne6te3i2aiscyqexy.appsync-api.us-east-1.amazonaws.com/graphql",
"Region": "us-east-1",
"AuthMode": "AMAZON_COGNITO_USER_POOLS",
"ClientDatabasePrefix": "gsmtach_AMAZON_COGNITO_USER_POOLS"
}
},
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "us-east-1:6a211b2f-d459-41d8-aeb9-0df470feec2c",
"Region": "us-east-1"
}
}
},
"CognitoUserPool": {
"Default": {
"PoolId": "us-east-1_NFgvtBM4l",
"AppClientId": "422sjhrr17kdrnjsc4v4gsdshq",
"Region": "us-east-1"
}
},
"Auth": {
"Default": {
"authenticationFlowType": "USER_SRP_AUTH",
"mfaConfiguration": "OFF",
"mfaTypes": [
"SMS"
],
"passwordProtectionSettings": {
"passwordPolicyMinLength": 8,
"passwordPolicyCharacters": []
},
"signupAttributes": [
"EMAIL"
],
"socialProviders": [],
"usernameAttributes": [
"EMAIL"
],
"verificationMechanisms": [
"EMAIL"
]
}
}
}
}
}
}
GraphQL Schema
type User {
id: ID!
balance: Float!
createdAt: AWSDateTime!
updatedAt: AWSDateTime!
}
type Transaction {
id: ID!
userId: ID!
date: AWSDateTime!
amount: Float!
type: String!
description: String
createdAt: AWSDateTime!
updatedAt: AWSDateTime!
}
type Order @aws_cognito_user_pools {
id: ID!
userId: ID!
status: String!
createdAt: AWSDateTime!
updatedAt: AWSDateTime
owner: String
}
input ModelStringInput {
ne: String
eq: String
le: String
lt: String
ge: String
gt: String
contains: String
notContains: String
between: [String]
beginsWith: String
attributeExists: Boolean
attributeType: ModelAttributeTypes
size: ModelSizeInput
}
input ModelIntInput {
ne: Int
eq: Int
le: Int
lt: Int
ge: Int
gt: Int
between: [Int]
attributeExists: Boolean
attributeType: ModelAttributeTypes
}
input ModelFloatInput {
ne: Float
eq: Float
le: Float
lt: Float
ge: Float
gt: Float
between: [Float]
attributeExists: Boolean
attributeType: ModelAttributeTypes
}
input ModelBooleanInput {
ne: Boolean
eq: Boolean
attributeExists: Boolean
attributeType: ModelAttributeTypes
}
input ModelIDInput {
ne: ID
eq: ID
le: ID
lt: ID
ge: ID
gt: ID
contains: ID
notContains: ID
between: [ID]
beginsWith: ID
attributeExists: Boolean
attributeType: ModelAttributeTypes
size: ModelSizeInput
}
input ModelSubscriptionStringInput {
ne: String
eq: String
le: String
lt: String
ge: String
gt: String
contains: String
notContains: String
between: [String]
beginsWith: String
in: [String]
notIn: [String]
}
input ModelSubscriptionIntInput {
ne: Int
eq: Int
le: Int
lt: Int
ge: Int
gt: Int
between: [Int]
in: [Int]
notIn: [Int]
}
input ModelSubscriptionFloatInput {
ne: Float
eq: Float
le: Float
lt: Float
ge: Float
gt: Float
between: [Float]
in: [Float]
notIn: [Float]
}
input ModelSubscriptionBooleanInput {
ne: Boolean
eq: Boolean
}
input ModelSubscriptionIDInput {
ne: ID
eq: ID
le: ID
lt: ID
ge: ID
gt: ID
contains: ID
notContains: ID
between: [ID]
beginsWith: ID
in: [ID]
notIn: [ID]
}
enum ModelAttributeTypes {
binary
binarySet
bool
list
map
number
numberSet
string
stringSet
_null
}
input ModelSizeInput {
ne: Int
eq: Int
le: Int
lt: Int
ge: Int
gt: Int
between: [Int]
}
enum ModelSortDirection {
ASC
DESC
}
type ModelUserConnection {
items: [User]!
nextToken: String
}
input ModelUserFilterInput {
id: ModelIDInput
balance: ModelFloatInput
createdAt: ModelStringInput
updatedAt: ModelStringInput
and: [ModelUserFilterInput]
or: [ModelUserFilterInput]
not: ModelUserFilterInput
}
type Query {
getUser(id: ID!): User
listUsers(filter: ModelUserFilterInput, limit: Int, nextToken: String): ModelUserConnection
getTransaction(id: ID!): Transaction
listTransactions(filter: ModelTransactionFilterInput, limit: Int, nextToken: String): ModelTransactionConnection
getOrder(id: ID!): Order @aws_cognito_user_pools
listOrders(filter: ModelOrderFilterInput, limit: Int, nextToken: String): ModelOrderConnection @aws_cognito_user_pools
}
input ModelUserConditionInput {
balance: ModelFloatInput
and: [ModelUserConditionInput]
or: [ModelUserConditionInput]
not: ModelUserConditionInput
createdAt: ModelStringInput
updatedAt: ModelStringInput
}
input CreateUserInput {
id: ID
balance: Float!
}
input UpdateUserInput {
id: ID!
balance: Float
}
input DeleteUserInput {
id: ID!
}
type Mutation {
createUser(input: CreateUserInput!, condition: ModelUserConditionInput): User
updateUser(input: UpdateUserInput!, condition: ModelUserConditionInput): User
deleteUser(input: DeleteUserInput!, condition: ModelUserConditionInput): User
createTransaction(input: CreateTransactionInput!, condition: ModelTransactionConditionInput): Transaction
updateTransaction(input: UpdateTransactionInput!, condition: ModelTransactionConditionInput): Transaction
deleteTransaction(input: DeleteTransactionInput!, condition: ModelTransactionConditionInput): Transaction
createOrder(input: CreateOrderInput!, condition: ModelOrderConditionInput): Order @aws_cognito_user_pools
updateOrder(input: UpdateOrderInput!, condition: ModelOrderConditionInput): Order @aws_cognito_user_pools
deleteOrder(input: DeleteOrderInput!, condition: ModelOrderConditionInput): Order @aws_cognito_user_pools
}
input ModelSubscriptionUserFilterInput {
id: ModelSubscriptionIDInput
balance: ModelSubscriptionFloatInput
createdAt: ModelSubscriptionStringInput
updatedAt: ModelSubscriptionStringInput
and: [ModelSubscriptionUserFilterInput]
or: [ModelSubscriptionUserFilterInput]
}
type Subscription {
onCreateUser(filter: ModelSubscriptionUserFilterInput): User @aws_subscribe(mutations: ["createUser"])
onUpdateUser(filter: ModelSubscriptionUserFilterInput): User @aws_subscribe(mutations: ["updateUser"])
onDeleteUser(filter: ModelSubscriptionUserFilterInput): User @aws_subscribe(mutations: ["deleteUser"])
onCreateTransaction(filter: ModelSubscriptionTransactionFilterInput): Transaction @aws_subscribe(mutations: ["createTransaction"])
onUpdateTransaction(filter: ModelSubscriptionTransactionFilterInput): Transaction @aws_subscribe(mutations: ["updateTransaction"])
onDeleteTransaction(filter: ModelSubscriptionTransactionFilterInput): Transaction @aws_subscribe(mutations: ["deleteTransaction"])
onCreateOrder(filter: ModelSubscriptionOrderFilterInput, owner: String): Order @aws_subscribe(mutations: ["createOrder"]) @aws_cognito_user_pools
onUpdateOrder(filter: ModelSubscriptionOrderFilterInput, owner: String): Order @aws_subscribe(mutations: ["updateOrder"]) @aws_cognito_user_pools
onDeleteOrder(filter: ModelSubscriptionOrderFilterInput, owner: String): Order @aws_subscribe(mutations: ["deleteOrder"]) @aws_cognito_user_pools
}
type ModelTransactionConnection {
items: [Transaction]!
nextToken: String
}
input ModelTransactionFilterInput {
id: ModelIDInput
userId: ModelIDInput
date: ModelStringInput
amount: ModelFloatInput
type: ModelStringInput
description: ModelStringInput
createdAt: ModelStringInput
updatedAt: ModelStringInput
and: [ModelTransactionFilterInput]
or: [ModelTransactionFilterInput]
not: ModelTransactionFilterInput
}
input ModelTransactionConditionInput {
userId: ModelIDInput
date: ModelStringInput
amount: ModelFloatInput
type: ModelStringInput
description: ModelStringInput
and: [ModelTransactionConditionInput]
or: [ModelTransactionConditionInput]
not: ModelTransactionConditionInput
createdAt: ModelStringInput
updatedAt: ModelStringInput
}
input CreateTransactionInput {
id: ID
userId: ID!
date: AWSDateTime!
amount: Float!
type: String!
description: String
}
input UpdateTransactionInput {
id: ID!
userId: ID
date: AWSDateTime
amount: Float
type: String
description: String
}
input DeleteTransactionInput {
id: ID!
}
input ModelSubscriptionTransactionFilterInput {
id: ModelSubscriptionIDInput
userId: ModelSubscriptionIDInput
date: ModelSubscriptionStringInput
amount: ModelSubscriptionFloatInput
type: ModelSubscriptionStringInput
description: ModelSubscriptionStringInput
createdAt: ModelSubscriptionStringInput
updatedAt: ModelSubscriptionStringInput
and: [ModelSubscriptionTransactionFilterInput]
or: [ModelSubscriptionTransactionFilterInput]
}
type ModelOrderConnection @aws_cognito_user_pools {
items: [Order]!
nextToken: String
}
input ModelOrderFilterInput {
id: ModelIDInput
userId: ModelIDInput
status: ModelStringInput
createdAt: ModelStringInput
updatedAt: ModelStringInput
and: [ModelOrderFilterInput]
or: [ModelOrderFilterInput]
not: ModelOrderFilterInput
owner: ModelStringInput
}
input ModelOrderConditionInput {
userId: ModelIDInput
status: ModelStringInput
createdAt: ModelStringInput
updatedAt: ModelStringInput
and: [ModelOrderConditionInput]
or: [ModelOrderConditionInput]
not: ModelOrderConditionInput
owner: ModelStringInput
}
input CreateOrderInput {
id: ID
userId: ID!
status: String!
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
input UpdateOrderInput {
id: ID!
userId: ID
status: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
input DeleteOrderInput {
id: ID!
}
input ModelSubscriptionOrderFilterInput {
id: ModelSubscriptionIDInput
userId: ModelSubscriptionIDInput
status: ModelSubscriptionStringInput
createdAt: ModelSubscriptionStringInput
updatedAt: ModelSubscriptionStringInput
and: [ModelSubscriptionOrderFilterInput]
or: [ModelSubscriptionOrderFilterInput]
owner: ModelStringInput
}
Additional information and screenshots
////setting build.gradle file
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
rootProject.name = "gsmTach"
include(":app")
The text was updated successfully, but these errors were encountered: