[BUG] Android 11 Crash
See original GitHub issueThis library seems to crash on Android 11. Is it planned to fix this? I dont get this error on other Android Versions
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException: Attempt to get length of null array
at com.codekidlabs.storagechooser.fragments.ChooserDialogFragment.populateList(ChooserDialogFragment.java:262)
at com.codekidlabs.storagechooser.fragments.ChooserDialogFragment.initListView(ChooserDialogFragment.java:115)
at com.codekidlabs.storagechooser.fragments.ChooserDialogFragment.getLayout(ChooserDialogFragment.java:85)
at com.codekidlabs.storagechooser.fragments.ChooserDialogFragment.onCreateDialog(ChooserDialogFragment.java:300)
at android.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:417)
at android.app.Fragment.performGetLayoutInflater(Fragment.java:1322)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1303)
at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431)
at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210)
at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:742)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Issue Analytics
- State:
- Created 3 years ago
- Comments:16
Top Results From Across the Web
App Keeps Stopping on Android? 11 Fixes to Try
Several factors cause an application to keep stopping or crashing in Android. The problem could be corrupt cache files, ...
Read more >Android OS 11 crash issue — Jewels Magic
If you are using android OS 11, crashes could happen. Users with the crashing issue need to uninstall the Webview update and then...
Read more >Android 11 : App crashed while opening a Camera inside the ...
Recently one of our customer update his Android phone to Android-11 and tried to upload a doc using camera.while taking the picture the...
Read more >Fix an installed Android app that isn't working - Google Support
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No need for an alternative. Someone else (sfilmak) fixed it. I forked his fork, tagged it and created a release for it. Since the original library uses jitpack, it’s really easy to switch over to use your own fork of it. I just changed out:
com.github.codekidX:storage-chooser:2.0.4.4
and replaced it with:
com.github.mveroukis:storage-chooser:2.0.4.4a
The “a” at the end is my own tag, otherwise it would continue using the same version as the original. Now my app works in Android 11. As a bonus, it also uses newer versions of it’s dependencies and targets API 30.
Good idea @mveroukis The commit https://github.com/sfilmak/storage-chooser/commit/c43a6b534855da6b2e87fa0f25d0c67d40c84fbf contains other changes that broke my build. I have forked and uploaded a commit with the only change that fixes the crash on Android 11 devices. Here’s the my version:
https://github.com/NoelChew/storage-chooser/commit/f0ffc9ce5df35c9597eebc3b819093b74136e082