Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerExceptionAttempt on checkPermission #146

Open
thuan09878 opened this issue Jan 30, 2018 · 1 comment
Open

NullPointerExceptionAttempt on checkPermission #146

thuan09878 opened this issue Jan 30, 2018 · 1 comment

Comments

@thuan09878
Copy link

Fatal Exception: java.lang.NullPointerExceptionAttempt to invoke virtual method 'int android.content.Context.checkPermission(java.lang.String, int, int)' on a null object reference

  | android.support.v4.content.ContextCompat.checkSelfPermission (ContextCompat.java:439)
  | agency.tango.materialintroscreen.SlideFragment.hasPermissionsToGrant (SlideFragment.java:154)
  | agency.tango.materialintroscreen.SlideFragment.hasAnyPermissionsToGrant (SlideFragment.java:95)
  | agency.tango.materialintroscreen.listeners.MessageButtonBehaviourOnPageSelected.pageSelected (MessageButtonBehaviourOnPageSelected.java:30)
  | agency.tango.materialintroscreen.MaterialIntroActivity$1.run (MaterialIntroActivity.java:113)
  | android.os.Handler.handleCallback (Handler.java:739)
  | com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)

I don't know where in my code cause this problem, this is the message i got from fabric.
Can you tell me how to fix this?

@Adsama94
Copy link

I faced this same issue. The fix for this is explained here - https://stackoverflow.com/questions/37322645/nullpointerexception-when-trying-to-check-permissions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants