question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/gu/option/Option;

See original GitHub issue

When using compile 'net.rdrei.android.dirchooser:library:3.2@aar', I get the following error:

04-09 22:50:20.638 11862 11862 E AndroidRuntime: Process: <>, PID: 11862
04-09 22:50:20.638 11862 11862 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/gu/option/Option;
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at net.rdrei.android.dirchooser.DirectoryChooserFragment.<init>(DirectoryChooserFragment.java:61)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at net.rdrei.android.dirchooser.DirectoryChooserFragment.newInstance(DirectoryChooserFragment.java:91)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at net.rdrei.android.dirchooser.DirectoryChooserActivity.onCreate(DirectoryChooserActivity.java:38)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:6570)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2534)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2641)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at android.app.ActivityThread.-wrap12(ActivityThread.java)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5849)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:763)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:653)
04-09 22:50:20.638 11862 11862 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.gu.option.Option" on path: DexPathList[[zip file "/data/app/<>-2/base.apk"],nativeLibraryDirectories=[/data/app/<>-2/lib/arm, /system/lib, /vendor/lib]]
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:94)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:311)
04-09 22:50:20.638 11862 11862 E AndroidRuntime:    ... 15 more
04-09 22:50:20.641 23023 23744 W ActivityManager:   Force finishing activity <>/net.rdrei.android.dirchooser.DirectoryChooserActivity

I have to use compile 'net.rdrei.android.dirchooser:library:3.2 instead.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:3
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
rohannexialabscommented, Jan 5, 2017

I am too experiencing this issue. Seems like this issue has repeated, follow this answer in an older issue to resolve this issue -

https://github.com/passy/Android-DirectoryChooser/issues/65#issuecomment-202602924

Just make sure that you are adding repository URL to your top level gradle file’s “allprojects” part.

2reactions
greysonpcommented, May 16, 2017

Copying the comment @rohannexialabs referred to:

repositories {
    maven { url 'http://guardian.github.com/maven/repo-releases' }
}

dependencies {
    compile 'com.gu:option:1.3'
    compile 'net.rdrei.android.dirchooser:library:3.2@aar'
}

This fixed it for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NoClassDefFoundError: Failed resolution of: Lcom ...
Recently, I made some update in my app, and it passed the all the test in virtual devices in my computer. However, after...
Read more >
java.lang.NoClassDefFoundError ... - the OneSpan Community
After integrating SDK , I am getting the error while initializing orchestrator and error is below :- java.lang.NoClassDefFoundError: Failed ...
Read more >
In-App Payments: Error ('Failed resolution of: Lcom/squareup ...
I'm using the in-app payments sdk and I'm having an issue when I try to start the card entry activity. I get the...
Read more >
Failed resolution of: Lorg/apache/http/ProtocolVersion; inside ...
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion; at fb.b(com.google.android.gms.DynamiteModulesB@12627054@12.6.27 ...
Read more >
java.lang.NoClassDefFoundError Failed resolution of: Lbgyx
Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lbgyx;. at com.google.android.gms.ads.internal.config.n.d(n.java).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found