java.lang.NullPointerException: Attempt to invoke virtual method 'int android.app.Activity.checkSelfPermission(java.lang.String)' on a null object reference

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Appcelerator JIRA by Josh Longton, 1 year ago
Attempt to invoke virtual method 'int android.app.Activity.checkSelfPermission(java.lang.String)' on a null object reference
via Appcelerator JIRA by Josh Longton, 1 year ago
Attempt to invoke virtual method 'int android.app.Activity.checkSelfPermission(java.lang.String)' on a null object reference
via Appcelerator JIRA by Wilson Luu, 1 year ago
Attempt to invoke virtual method 'int android.app.Activity.checkSelfPermission(java.lang.String)' on a null object reference
via Appcelerator JIRA by Wilson Luu, 1 year ago
Attempt to invoke virtual method 'int android.app.Activity.checkSelfPermission(java.lang.String)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.app.Activity.checkSelfPermission(java.lang.String)' on a null object reference
at org.appcelerator.titanium.util.TiFileHelper2.hasStoragePermission(TiFileHelper2.java:89)
at org.appcelerator.titanium.util.TiResponseCache.get(TiResponseCache.java:314)
at com.android.okhttp.internal.huc.CacheAdapter.getJavaCachedResponse(CacheAdapter.java:103)
at com.android.okhttp.internal.huc.CacheAdapter.get(CacheAdapter.java:47)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:388)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:501)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
at com.facebook.GraphResponse.fromHttpConnection(GraphResponse.java:253)
at com.facebook.GraphRequest.executeConnectionAndWait(GraphRequest.java:1255)
at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1157)
at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1124)
at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1108)
at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:1083)
at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:977)
at com.facebook.internal.Utility.getAppSettingsQueryResponse(Utility.java:868)
at com.facebook.internal.Utility.access$1(Utility.java:860)
at com.facebook.internal.Utility$1.run(Utility.java:797)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.