Android Callback must not be null



I have implemented Twitter login with Fabric plugin for Android Studio and it works.
Then I moved my code to a fragment and I got this:

> java.lang.IllegalArgumentException: Callback must not be null.
> at
> at$LoginClickListener.onClick(
> at android.view.View.performClick(
> at android.view.View$
> at android.os.Handler.handleCallback(
> at android.os.Handler.dispatchMessage(
> at android.os.Looper.loop(
> at
> at java.lang.reflect.Method.invoke(Native Method)
> at java.lang.reflect.Method.invoke(
> at$
> at

I’m setting the callback in the onCreateView of the fragment, but on button click I got the null error.
I set
TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
Fabric.with(this, new Twitter(authConfig));

in to application class.