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

Getting error java.lang.NoClassDefFoundError: Failed resolution of: Lorg/slf4j/LoggerFactory; at io.getunleash.UnleashClient.<clinit>(UnleashClient.kt:82) #78

Closed
daniel-waiguru opened this issue Jun 13, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@daniel-waiguru
Copy link

Describe the bug

I am getting this error on release build java.lang.NoClassDefFoundError: Failed resolution of: Lorg/slf4j/LoggerFactory; at io.getunleash.UnleashClient.(UnleashClient.kt:82) while trying to instantiate unleash client

Steps to reproduce the bug

  1. Add unleash dependency
  2. Add proguard rules
  3. Create unleash client on app startup
  4. Launch release build app
  5. App crashes with the error above issue seem to be Logger used in UnleashClient

Expected behavior

Unleash client should be created with app crash

Logs, error output, etc.

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/slf4j/LoggerFactory;
                                                                                                    at io.getunleash.UnleashClient.<clinit>(UnleashClient.kt:82)

Screenshots

No response

Additional context

No response

Unleash version

1.0.0

Subscription type

Enterprise

Hosting type

Hosted by Unleash

SDK information (language and version)

Mobile SDK version 1.0.0

@daniel-waiguru daniel-waiguru added the bug Something isn't working label Jun 13, 2024
@chriswk chriswk self-assigned this Jun 13, 2024
@chriswk
Copy link
Member

chriswk commented Jun 13, 2024

Hi I think you need to add org.slf4j.* to your proguard inclusion rules. We're working on a new version of the Android SDK which should fix most of these issues (Use logging from the android skeleton).

@chriswk chriswk moved this from New to In Progress in Issues and PRs Jun 13, 2024
@daniel-waiguru
Copy link
Author

This doesn't seem to solve the issue, is this logger library opensource? I would like to see their proguard rules

@gastonfournier
Copy link
Contributor

We've launched a new SDK https://github.com/Unleash/unleash-android which does not use SLF4J and leans on native Android logging.

This is a migration guide: https://github.com/Unleash/unleash-android/blob/main/docs/MigrationGuide.md

@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants