java.lang.NullPointerException: storage == null

GitHub | ddudek | 2 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    GitHub comment 27#279963294

    GitHub | 2 months ago | ddudek
    java.lang.NullPointerException: storage == null
  2. 0

    GitHub comment 27#240646881

    GitHub | 8 months ago | MisterY
    java.lang.NullPointerException: storage == null
  3. 0
    samebug tip
    If you're using nested fragments, you have to use childFragmentManager instead of fragmentManager.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    When you use findViewById inside an activity it is going to look for a View inside your main_activity.xml. If it's not there, it throws this exception, try to use the right view to call findviewById.
  6. 0
    samebug tip
    As of SDK 23, you have to call this method with ContextCompat.getColor(context, R.color.my_color) so it works with previous API as well. Also, you have to add the support V4 library to your dependencies: "compile 'com.android.support:support-v4:23.0.1'"
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    storage == null

    at java.util.Arrays$ArrayList.<init>()
  2. Java RT
    Arrays.asList
    1. java.util.Arrays$ArrayList.<init>(Arrays.java:38)
    2. java.util.Arrays.asList(Arrays.java:155)
    2 frames
  3. com.nbsp.materialfilepicker
    DirectoryFragment.onViewCreated
    1. com.nbsp.materialfilepicker.utils.FileUtils.getFileListByDirPath(FileUtils.java:16)
    2. com.nbsp.materialfilepicker.ui.DirectoryFragment.initFilesList(DirectoryFragment.java:84)
    3. com.nbsp.materialfilepicker.ui.DirectoryFragment.onViewCreated(DirectoryFragment.java:79)
    3 frames
  4. Android Platform
    ActivityThread.main
    1. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:919)
    2. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1083)
    3. android.app.BackStackRecord.run(BackStackRecord.java:834)
    4. android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1470)
    5. android.app.FragmentManagerImpl$1.run(FragmentManager.java:452)
    6. android.os.Handler.handleCallback(Handler.java:739)
    7. android.os.Handler.dispatchMessage(Handler.java:95)
    8. android.os.Looper.loop(Looper.java:145)
    9. android.app.ActivityThread.main(ActivityThread.java:6934)
    9 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
    2 frames