Open KhanStan99 opened 6 years ago
Hello check this
Hi @zeevy , I am handling that case on my side. when user haven't selected anything my app works fine. but this error is different. Event after providing permissions the app crashes.
Edit: And it is also very weird, It is working fine when i install debug APK from android studio but when i test after uploading on play store when it test i face this issue.
It may work in debug build because Proguard may be disabled in debug build. Make sure you tested the release apk before pushing it to play store.
I face two problem with this lib
To make sure its proguard issue you can generate the signed release apk with out proguard enabled. And install the apk on your phone and test it.
additionally you can try adding all these proguard rule which are mentioned in the Readme.md
# Glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
# support-v7-appcompat
-keep public class android.support.v7.widget.** { *; }
-keep public class android.support.v7.internal.widget.** { *; }
-keep public class android.support.v7.internal.view.menu.** { *; }
-keep public class * extends android.support.v4.view.ActionProvider {
public <init>(android.content.Context);
}
# support-design
-dontwarn android.support.design.**
-keep class android.support.design.** { *; }
-keep interface android.support.design.** { *; }
-keep public class android.support.design.R$* { *; }
Hi @zeevy , I have added these lines in proguard and enabled in debug. now it gives me this error. It does not even open the application.
java.lang.RuntimeException: Unable to get provider droidninja.filepicker.utils.FilePickerProvider: java.lang.ClassNotFoundException: Didn't find class "droidninja.filepicker.utils.FilePickerProvider" on path: DexPathList[[zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/base.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_dependencies_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_resources_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_0_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_1_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_2_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_3_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_4_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_5_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_6_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_7_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_8_apk.apk", zip file "/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.scoratech.scoraxchange.devbuild-6T40M2EdkMMAGlAoAw_yNQ==/lib/arm64, /system/lib64, /system/vendor/lib64]]
Have you tried? minifyEnabled false shrinkResources false
in buildTypes release
Oh those both are enabled. should i disabled in both release and debug?
Yes disable and check
From: Hidayat Ullah Khan notifications@github.com Sent: Tuesday, July 24, 2018 10:44:52 AM To: DroidNinja/Android-FilePicker Cc: zeevy; Mention Subject: Re: [DroidNinja/Android-FilePicker] java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.SearchView.setOnQueryTextListener(android.support.v7.widget.SearchView$c)' on a null object reference (#176)
Oh those both are enabled. should i disabled in both release and debug?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/DroidNinja/Android-FilePicker/issues/176#issuecomment-407283693, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA5W0WbgOQaqtrQbgnToESXoNt-pm_WLks5uJq1MgaJpZM4VQmEJ.
Yes, it is working fine after disabling those 2.
That means, you probably misplaced your proguard rules. You need to add proper rules in proper place
This is my build.gradle file which is working fine.
https://github.com/zeevy/grblcontroller/blob/master/app/build.gradle
Ok thanks 👍👍
Again same issue in latest version2.2.0 I tried all above ideas
I encountered this problem in latest library 2.1.5. When i provide permission and picker loads this error occurs.
build.gradle
implementation 'com.droidninja:filepicker:2.1.5'
Photo Picker Code:
File Picker Code:
It was working fine in debug APK, but when i put it into PlayStore it gives me this error. (Same Code)