passy / Android-DirectoryChooser

A directory chooser library for Android.
Apache License 2.0
515 stars 144 forks source link

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

Open jaredsburrows opened 8 years ago

jaredsburrows commented 8 years ago

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 commented 8 years ago

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

mmmarklu commented 8 years ago

same here

jessb417 commented 8 years ago

Same here

Bikeshtri commented 8 years ago

same here

RMaple commented 8 years ago

So sad

luclx commented 7 years ago

same issue, please check it.

elirangoshen commented 7 years ago

same here...

rohannexialabs commented 7 years ago

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.

Yazon2006 commented 7 years ago

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

kojeomstudio commented 7 years ago

I have the same problem. :(

ghost commented 7 years ago

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

greysonp commented 7 years ago

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 commented 7 years ago

check out the option project manually is also a way.

jaredsburrows commented 7 years ago

Any update on this?

passy commented 7 years ago

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 commented 7 years ago

Why rely on this then? Can you use either another library or no library?

On Jul 26, 2017 10:22 AM, "Pascal Hartig" notifications@github.com wrote:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/passy/Android-DirectoryChooser/issues/86#issuecomment-318123504, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqMSLq_k7E2qmtQU5vBEC_hULxw3MANks5sR3XsgaJpZM4IDxzi .

passy commented 7 years ago

Another library should be fine. This was the only one that was around back then, I'm sure there are other ones now. Happy to take a look at a PR about this.

On Wed, Jul 26, 2017 at 18:39 Jared Burrows notifications@github.com wrote:

Why rely on this then? Can you use either another library or no library?

On Jul 26, 2017 10:22 AM, "Pascal Hartig" notifications@github.com wrote:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/passy/Android-DirectoryChooser/issues/86#issuecomment-318123504 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ABqMSLq_k7E2qmtQU5vBEC_hULxw3MANks5sR3XsgaJpZM4IDxzi

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/passy/Android-DirectoryChooser/issues/86#issuecomment-318127941, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAmssB2nF_8KWFgir1_4L6pMi4WTetMks5sR3m8gaJpZM4IDxzi .

--

Pascal Hartig Software Engineer

http://passy.me/ Twitter: https://twitter.com/passy Google+: http://gplus.to/passy

phramusca commented 2 years ago

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'
}