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

pressing on skip and done button, app crashed showing this error #206

Closed
milon87 opened this issue Apr 11, 2016 · 6 comments
Closed

pressing on skip and done button, app crashed showing this error #206

milon87 opened this issue Apr 11, 2016 · 6 comments

Comments

@milon87
Copy link

milon87 commented Apr 11, 2016

Fatal Main...
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.support.v4.app.FragmentActivity.getApplicationContext()' on a null object reference
at com.enableit.eboimelabd.fragment.HomeFragment$2.onResponse(HomeFragment.java:131)
at com.enableit.eboimelabd.fragment.HomeFragment$2.onResponse(HomeFragment.java:109)
at com.enableit.eboimelabd.connectivity.GsonRequest.deliverResponse(GsonRequest.java:51)
at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5696)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)

@avluis
Copy link
Contributor

avluis commented Apr 16, 2016

Note: I'm not part of the library development team.

Do you have a Fragment with the name of HomeFragment?

These lines point to that:

at com.enableit.eboimelabd.fragment.HomeFragment$2.onResponse(HomeFragment.java:131)
at com.enableit.eboimelabd.fragment.HomeFragment$2.onResponse(HomeFragment.java:109)

This tells me where ever you are grabbing app context from, its null:

android.support.v4.app.FragmentActivity.getApplicationContext()' on a null object reference

This library has none of those files btw.

As for the skip + done combination, definitely a weird one, but it sounds like you are passing context from the activity implementing this library?
If so, try grabbing that from from the activity implementing those fragments or from an application class.

@milon87
Copy link
Author

milon87 commented Apr 16, 2016

Yes, I have a fragment named HomeFragment (it is based on support.v4...., not fragmentactivity). I was trying to go to HomeFragment after clicking to the Skip button.

@avluis
Copy link
Contributor

avluis commented Apr 16, 2016

I understand - what does your intent look like for launching this Fragment;
What activity is hosting it?

@milon87
Copy link
Author

milon87 commented Apr 17, 2016

The fragment is calling from MainActivity which extends AppcompactActivity. But I am not using this library anymore.

@avluis
Copy link
Contributor

avluis commented Apr 17, 2016

Oh, in that case, then this issue can be closed, correct?
Or are you referring (when you say this library) to AppCompatActivity?

@milon87
Copy link
Author

milon87 commented Apr 17, 2016

yes, it can be closed . Thanks for your help 👍
Actually, I am referring to AppIntro.

@milon87 milon87 closed this as completed Apr 17, 2016
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