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

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

Open
jaredsburrows opened this issue Apr 10, 2016 · 18 comments

Comments

@jaredsburrows
Copy link
Contributor

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.

@lampione
Copy link

Same happens to me, with the differnce that using
compile 'net.rdrei.android.dirchooser:library:3.2' won't compile.

@mmmarklu
Copy link

same here

@jessb417
Copy link

Same here

@Bikeshtri
Copy link

same here

@RMaple
Copy link

RMaple commented Sep 2, 2016

So sad

@luclx
Copy link

luclx commented Dec 3, 2016

same issue, please check it.

@elirangoshen
Copy link

same here...

@rohannexialabs
Copy link

rohannexialabs commented 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 -

#65 (comment)

Just make sure that you are adding repository URL to your top level gradle file's "allprojects" part.

@Yazon2006
Copy link

@rohannexialabs Actually not only repository URL should be added but also com.gu:option dependency.

@kojeomstudio
Copy link

I have the same problem. :(

@ghost
Copy link

ghost commented May 1, 2017

me too.
I just downloaded the lib and included it and I think I was okay.

@greysonp
Copy link

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.

@weity
Copy link

weity commented Jun 10, 2017

check out the option project manually is also a way.

@jaredsburrows
Copy link
Contributor Author

Any update on this?

@passy
Copy link
Owner

passy commented Jul 26, 2017

No update from my end. Until the guardian decides to publish this library elsewhere or someone ports this to another compatible library we'll probably be stuck with the manual declaration.

@jaredsburrows
Copy link
Contributor Author

jaredsburrows commented Jul 26, 2017 via email

@passy
Copy link
Owner

passy commented Jul 26, 2017 via email

@phramusca
Copy link

From previous answers but with an https url and implementation instead of compile :

repositories {
    maven { url 'https://guardian.github.io/maven/repo-releases/' }
}

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

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

No branches or pull requests