As in the comments, we really cannot know without extra code what is wrong. But, looking closer at the NullPointerException, this is a fairly common problem with OAuth and WebView. You can see that your OAuthWebView was most likely null. This means that you probably need to create a web view, since you probably never created one.
The sample you are talking about may have a web view embedded in .xml XML files or in another action, or you forgot this code. Just check it carefully and if you can send the code. The zip code where you create the OAuthWebView. It seems that after setting up the OAuthWebView custom web view, this error should go away.
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.box.boxandroidlibv2.views.OAuthWebView.setAllowShowingRedirectPage(boolean)' on a null object reference
When you get Attempt to invoke virtual method -blahblahblah- on a null object reference back and look at the last function, AKA is the virtual method, the call was (in your case it was setAllowingShowingRedirectPage(boolean) ), and the null object was the object that called this function, OAuthWebView ,
This happens twice in your stack trace, so it is very likely that creating or managing your OAuthWebView instance is a problem.
source share