java.lang.NullPointerException: Attempt to invoke virtual method ‘java.io.File android.content.Context.getFilesDir()’ on a null object reference

sinch.com | 4 months ago
  1. 0

    Android VoIP Example | Android App to Phone Calling | Sinch

    sinch.com | 4 months ago
    java.lang.NullPointerException: Attempt to invoke virtual method ‘java.io.File android.content.Context.getFilesDir()’ on a null object reference
  2. 0

    buffered reader different class

    Stack Overflow | 4 years ago | fajarhac
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.easylog/com.easylog.MainActivity}: java.lang.NullPointerException
  3. 0

    NullPointerException Error in getFilesDir() Method

    Stack Overflow | 5 years ago | Brandon Yantz
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android: write to file OnDestroy()

    Stack Overflow | 4 years ago | MaxOvrdrv
    java.lang.NullPointerException
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

    Attempt to invoke virtual method ‘java.io.File android.content.Context.getFilesDir()’ on a null object reference

    at android.content.ContextWrapper.getFilesDir()
  2. Android Platform
    ContextWrapper.getFilesDir
    1. android.content.ContextWrapper.getFilesDir(ContextWrapper.java:217)
    1 frame
  3. com.sinch.android
    DefaultSinchClientBuilder.build
    1. com.sinch.android.rtc.internal.client.SinchDBPathHelper.getDatabasePath(SinchDBPathHelper.java:31)
    2. com.sinch.android.rtc.internal.client.SinchDBPathHelper.getPathForInstantMessagingDatabase(SinchDBPathHelper.java:24)
    3. com.sinch.android.rtc.internal.client.InternalSinchClientFactory.createSinchClient(InternalSinchClientFactory.java:16)
    4. com.sinch.android.rtc.DefaultSinchClientBuilder.build(DefaultSinchClientBuilder.java:95)
    4 frames
  4. com.mazeworks.depot
    MainActivity.<init>
    1. com.mazeworks.depot.MainActivity.<init>(MainActivity.java:42)
    1 frame
  5. Java RT
    Class.newInstance
    1. java.lang.reflect.Constructor.newInstance(Native Method)
    2. java.lang.Class.newInstance(Class.java:1684)
    2 frames
  6. Android Platform
    ActivityThread.main
    1. android.app.Instrumentation.newActivity(Instrumentation.java:1080)
    2. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2954)
    3. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218)
    4. android.app.ActivityThread.access$1000(ActivityThread.java:198)
    5. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676)
    6. android.os.Handler.dispatchMessage(Handler.java:102)
    7. android.os.Looper.loop(Looper.java:145)
    8. android.app.ActivityThread.main(ActivityThread.java:6837)
    8 frames
  7. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  8. 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