You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
api ("com.amplifyframework:aws-analytics-pinpoint:2.14.13") {
exclude( group ="androidx.lifecycle", module ="lifecycle-viewmodel-ktx")
}
api ("com.amplifyframework:aws-auth-cognito:2.14.13") {
exclude( group ="androidx.lifecycle", module ="lifecycle-viewmodel-ktx")
}
Environment information
Build time: 2023-04-21 12:31:26 UTC
Revision: 1cf537a851c635c364a4214885f8b9798051175b
Kotlin: 1.8.10
Groovy: 3.0.15
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 17.0.10 (JetBrains s.r.o. 17.0.10+0-17.0.10b1087.21-11572160)
OS: Mac OS X 12.3 aarch64
Please include any relevant guides or documentation you're referencing
Does the amplify SDK only support Android 8.0 and above, contrary to what the guide documentation says?
If not, could you please revise it to support from android 7.0 onwards?
Run the app with the amplify SDK V2.14.13 on top of an android 7.0 or 7.1 device.
It crashes immediately.
Code Snippet
Amplify.addPlugin(AWSCognitoAuthPlugin())
Log output
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Duration;
at aws.smithy.kotlin.runtime.http.engine.okhttp.OkHttpEngineKt.buildClient(OkHttpEngine.kt:88)
at aws.smithy.kotlin.runtime.http.engine.okhttp.OkHttpEngineKt.access$buildClient(OkHttpEngine.kt:1)
at aws.smithy.kotlin.runtime.http.engine.okhttp.OkHttpEngine.<init>(OkHttpEngine.kt:44)
at aws.smithy.kotlin.runtime.http.engine.okhttp.OkHttpEngine$Companion.invoke(OkHttpEngine.kt:38)
at aws.smithy.kotlin.runtime.http.engine.DefaultHttpEngineJVMKt.newDefaultHttpEngine(DefaultHttpEngineJVM.kt:14)
at aws.smithy.kotlin.runtime.http.engine.DefaultHttpEngineKt.DefaultHttpEngine(DefaultHttpEngine.kt:23)
at aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl$BuilderImpl$engineConstructor$1.invoke(HttpEngineConfigImpl.kt:20)
at aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl$BuilderImpl$engineConstructor$1.invoke(HttpEngineConfigImpl.kt:20)
at aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl$BuilderImpl$engineSupplier$1.invoke(HttpEngineConfigImpl.kt:21)
at aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl$BuilderImpl$engineSupplier$1.invoke(HttpEngineConfigImpl.kt:21)
at aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl$BuilderImpl.buildHttpEngineConfig(HttpEngineConfigImpl.kt:75)
at aws.sdk.kotlin.services.cognitoidentity.CognitoIdentityClient$Config$Builder.buildHttpEngineConfig(CognitoIdentityClient.kt)
at aws.sdk.kotlin.services.cognitoidentity.CognitoIdentityClient$Config.<init>(CognitoIdentityClient.kt:133)
at aws.sdk.kotlin.services.cognitoidentity.CognitoIdentityClient$Config.<init>(CognitoIdentityClient.kt)
at aws.sdk.kotlin.services.cognitoidentity.CognitoIdentityClient$Config$Builder.build(CognitoIdentityClient.kt:284)
at aws.sdk.kotlin.services.cognitoidentity.CognitoIdentityClient$Config$Builder.build(CognitoIdentityClient.kt:171)
at aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder.build(AbstractSdkClientBuilder.kt:20)
at aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder.build(AbstractSdkClientBuilder.kt:13)
at aws.smithy.kotlin.runtime.client.SdkClientFactory$DefaultImpls.invoke(SdkClientFactory.kt:32)
at aws.sdk.kotlin.runtime.config.AbstractAwsSdkClientFactory.invoke(AbstractAwsSdkClientFactory.kt:42)
at com.amplifyframework.auth.cognito.AWSCognitoAuthService$Companion.fromConfiguration$aws_auth_cognito_release(AWSCognitoAuthService.kt:53)
at com.amplifyframework.auth.cognito.AWSCognitoAuthPlugin.configure(AWSCognitoAuthPlugin.kt:133)
at com.amplifyframework.core.category.Category.configure(Category.java:92)
at com.amplifyframework.core.Amplify.configure(Amplify.java:159)
at com.amplifyframework.core.Amplify.configure(Amplify.java:129)
Caused by: java.lang.ClassNotFoundException: Didn't find class "java.time.Duration" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.xxx.xxx.debug-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.xxx.debug-1/lib/arm64, /data/app/com.xxx.xxx.debug-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 47 more
amplifyconfiguration.json
No response
GraphQL Schema
// Putyourschema below this line
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered:
Hi @cojobs. Amplify (and its dependencies) use Java 8 features, so if your minimum SDK is below 26 you need to enable core library desugaring for your app. This is covered in the install Amplify libraries section of the docs.
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Before opening, please confirm:
Language and Async Model
Kotlin, Kotlin - Coroutines
Amplify Categories
Analytics
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
https://docs.amplify.aws/android/start/project-setup/prerequisites/
Describe the bug
Running the app with amplify SDK V2.14.13 on Android OS version 7 and 7.1 devices immediately crashes.
The documentation https://docs.amplify.aws/android/start/project-setup/prerequisites/ specifies android 7.0 or later.
Does the amplify SDK only support Android 8.0 and above, contrary to what the guide documentation says?
If not, could you please revise it to support from android 7.0 onwards?
(https://developer.android.com/reference/java/time/Duration says that the Duration class was added as of API level 26.)
Reproduction steps (if applicable)
Code Snippet
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: