Skip to content
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

After upgrade to version 5.4.0. My Unit test failed #362

Open
juckrit opened this issue Oct 25, 2024 · 1 comment
Open

After upgrade to version 5.4.0. My Unit test failed #362

juckrit opened this issue Oct 25, 2024 · 1 comment
Labels

Comments

@juckrit
Copy link

juckrit commented Oct 25, 2024

Expected behavior

Unit test should pass

Actual behavior

got Error

Steps to reproduce the issue

After upgrade omise from 4.+ to version 5.4.0.
My Unit test failed

Logs

Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

Task :app:testReleaseUnitTest FAILED
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/sam/.gradle/caches/transforms-4/142166b1a4c6acbf31ffeadb0fd0f22b/transformed/jetified-logback-android-1.3.0-3-runtime.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/sam/.gradle/caches/transforms-4/dddc98967a8d3dc98a00b6aa4bd4906f/transformed/jetified-logback-android-1.3.0-3/jars/classes.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

'boolean android.util.Log.isLoggable(java.lang.String, int)'
java.lang.UnsatisfiedLinkError: 'boolean android.util.Log.isLoggable(java.lang.String, int)'
at android.util.Log.isLoggable(Native Method)
at android.os.storage.StorageManager.(StorageManager.java:138)
at android.os.Environment$UserEnvironment.getExternalDirs(Environment.java:184)
at android.os.Environment.getExternalStorageState(Environment.java:1279)
at ch.qos.logback.core.android.AndroidContextUtil.getMountedExternalStorageDirectoryPath(Unknown Source)
at ch.qos.logback.core.android.AndroidContextUtil.setupProperties(Unknown Source)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(Unknown Source)
at org.slf4j.impl.StaticLoggerBinder.init(Unknown Source)
at org.slf4j.impl.StaticLoggerBinder.(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at io.mockk.impl.log.JvmLogging.slf4jOrJulLogging(JvmLogging.kt:10)
at io.mockk.impl.JvmMockKGateway.(JvmMockKGateway.kt:166)

Screenshots

Screenshot 2567-10-29 at 11 19 13

Name and version information

Android Studio Ladybug | 2024.2.1 Patch 1
Omise sdk version 5.4.0

@juckrit juckrit added the bug label Oct 25, 2024
@juckrit juckrit closed this as completed Oct 28, 2024
@juckrit juckrit reopened this Oct 29, 2024
@AnasNaouchi
Copy link
Collaborator

Hello @juckrit ,
Thank you for reaching out,
I believe that the error that you are facing is due to the fact that in our latest releases we added the library:

implementation "org.slf4j:slf4j-api:1.7.36"

And in your app it seems that you are using some other version.
Can you please refer to the guide indicated in your logs to help you resolve the issue: http://www.slf4j.org/codes.html#multiple_bindings
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants