FirzenYogesh / FileListerDialog

A simple file/ directory picker dialog for android
Apache License 2.0
444 stars 78 forks source link

NoClassDefFoundError: Failed resolution of: Lyogesh/firzen/mukkiasevaigal/M; #4

Open alexeyvasilyev opened 7 years ago

alexeyvasilyev commented 7 years ago

Getting a crash on FileListerDialog open.

FileListerDialog fileListerDialog = FileListerDialog.createFileListerDialog(context);
fileListerDialog.setOnFileSelectedListener(new OnFileSelectedListener() {
    @Override
    public void onFileSelected(File file, String path) {
        //your code here
    }
});
fileListerDialog.setDefaultDir("/");
fileListerDialog.setFileFilter(FileListerDialog.FILE_FILTER.DIRECTORY_ONLY);
fileListerDialog.show();

Full error stack:

java.lang.NoClassDefFoundError: Failed resolution of: Lyogesh/firzen/mukkiasevaigal/M;
at yogesh.firzen.filelister.FileListerAdapter.fileLister(FileListAdapter.java:143)
at yogesh.firzen.filelister.FileListerAdapter.start(FileListAdapter.java:56)
at yogesh.firzen.filelister.FilesListerView.start(FilesListerView.java:58)
at yogesh.firzen.filelister.FileListerDialog.show(FileListerDialog.java:93)
at com.alexvas.dvr.preference.AppRecordingPrefFragment$3.onClick(AppRecordingPrefFragment.java:212)
at com.alexvas.dvr.utils.UIUtils$2.onClick(UIUtils.java:579)
at android.view.View.performClick(View.java:6256)
at android.view.View$PerformClick.run(View.java:24697)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Caused by: java.lang.ClassNotFoundException: Didn't find class "yogesh.firzen.mukkiasevaigal.M" on path: DexPathList[[zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/base.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_dependencies_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/base.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_dependencies_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_0_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_1_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_2_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_3_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_4_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_5_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_6_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_7_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_8_apk.apk!/lib/x86, /data/app/com.alexvas.dvr.pro-C4Kqk8nNyj5KSPHDbXiQvw==/split_lib_slice_9_apk.apk!/lib/x86, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at yogesh.firzen.filelister.FileListerAdapter.fileLister(FileListAdapter.java:143) 
at yogesh.firzen.filelister.FileListerAdapter.start(FileListAdapter.java:56) 
at yogesh.firzen.filelister.FilesListerView.start(FilesListerView.java:58) 
at yogesh.firzen.filelister.FileListerDialog.show(FileListerDialog.java:93) 
at com.alexvas.dvr.preference.AppRecordingPrefFragment$3.onClick(AppRecordingPrefFragment.java:212) 
at com.alexvas.dvr.utils.UIUtils$2.onClick(UIUtils.java:579) 
at android.view.View.performClick(View.java:6256) 
at android.view.View$PerformClick.run(View.java:24697) 
at android.os.Handler.handleCallback(Handler.java:789) 
at android.os.Handler.dispatchMessage(Handler.java:98) 
at android.os.Looper.loop(Looper.java:164) 
FirzenYogesh commented 7 years ago

Did you try 'Clean Project' ?

alexeyvasilyev commented 7 years ago

Yes, of cause.

FirzenYogesh commented 7 years ago

The FileListerDialog depends on various libraries specified in the Readme section. Double check if you have imported all of those.

alexeyvasilyev commented 7 years ago

Can you make a sample project how your library works and put it in app directory?

FirzenYogesh commented 7 years ago

try adding all these in your app module's build.gradle

dependencies { implementation 'com.android.support:appcompat-v7:26.0.0-beta2' implementation 'com.android.support:design:26.0.0-beta2' implementation 'com.android.support:recyclerview-v7:26.0.0-beta2' implementation 'yogesh.firzen:MukkiyaSevaigal:1.0.6' }

I'll try to put up a sample soon

4sskick commented 6 years ago

I got this error message too. And I've been tried to add dependencies @FirzenYogesh suggested implementation 'yogesh.firzen:MukkiyaSevaigal:1.0.6' But got nothing! Please tell me how to solve

isabsent commented 6 years ago

Adding compile 'yogesh.firzen:MukkiyaSevaigal:1.0.6' to the app level build.gradle solves the problem for me.

m-mirghafari commented 6 years ago

Hi. i have this problem too. when i want to choose directory everything is ok. but when i want to choose file this crash happens!

xupeng72083 commented 6 years ago

Hi, I have a problem. When I choose directory, it's OK. But when choosing file, app crashed. Please check this error.

06-30 18:01:51.486 27500-27500/com.aurora.tag.tool E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.aurora.tag.tool, PID: 27500
    java.lang.NoClassDefFoundError: org.apache.commons.io.FilenameUtils
        at yogesh.firzen.mukkiasevaigal.S.isImage(S.java:359)
        at yogesh.firzen.mukkiasevaigal.S.isImage(S.java:370)
        at yogesh.firzen.filelister.FileListerAdapter.onBindViewHolder(FileListAdapter.java:203)
        at yogesh.firzen.filelister.FileListerAdapter.onBindViewHolder(FileListAdapter.java:30)
        at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6474)
        at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6507)
        at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5450)
        at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5716)
        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5555)
        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5551)
        at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2211)
        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1538)
        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1498)
        at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1312)
        at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1057)
        at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4836)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:788)
        at android.view.Choreographer.doCallbacks(Choreographer.java:591)
        at android.view.Choreographer.doFrame(Choreographer.java:559)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:774)
        at android.os.Handler.handleCallback(Handler.java:808)
        at android.os.Handler.dispatchMessage(Handler.java:103)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:5310)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:835)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:651)
        at dalvik.system.NativeStart.main(Native Method)

Please kindly reply.

FirzenYogesh commented 6 years ago

@xupeng72083 did you add this line in your gradle file? implementation 'org.apache.commons:commons-io:1.3.2'