Box.COM integration with an android app-OAuthActivity-Nullpointerexception? -


i integrating box.com android application.so using boxandroidlibraryv2 , boxjavalibraryv2 application. run sample android application boxsdksample. copied necessary class , layouts sample application.now getting error message follows.

07-23 15:51:02.230: e/androidruntime(14857): process: com.filenet.ecm, pid: 14857  07-23 15:51:02.230: e/androidruntime(14857): java.lang.runtimeexception: unable start activity componentinfo{com.filenet.ecm/com.box.boxandroidlibv2.activities.oauthactivity} : java.lang.nullpointerexception: attempt invoke virtual method 'void com.box.boxandroidlibv2.views.oauthwebview.setallowshowingredirectpage(boolean)' on null object reference  07-23 15:51:02.230: e/androidruntime(14857): @ android.app.activitythread.performlaunchactivity(activitythread.java:2411)  07-23 15:51:02.230: e/androidruntime(14857): @ android.app.activitythread.handlelaunchactivity(activitythread.java:2474)  07-23 15:51:02.230: e/androidruntime(14857): @ android.app.activitythread.access$800(activitythread.java:144)  07-23 15:51:02.230: e/androidruntime(14857): @ android.app.activitythread$h.handlemessage(activitythread.java:1359)  07-23 15:51:02.230: e/androidruntime(14857): @ android.os.handler.dispatchmessage(handler.java:102)  07-23 15:51:02.230: e/androidruntime(14857): @ android.os.looper.loop(looper.java:155)  07-23 15:51:02.230: e/androidruntime(14857): @ android.app.activitythread.main(activitythread.java:5696)  07-23 15:51:02.230: e/androidruntime(14857): @ java.lang.reflect.method.invoke(native method)  07-23 15:51:02.230: e/androidruntime(14857): @ java.lang.reflect.method.invoke(method.java:372)  07-23 15:51:02.230: e/androidruntime(14857): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1029)  07-23 15:51:02.230: e/androidruntime(14857): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:824)  07-23 15:51:02.230: e/androidruntime(14857): caused by: java.lang.nullpointerexception: attempt invoke virtual method 'void com.box.boxandroidlibv2.views.oauthwebview.setallowshowingredirectpage(boolean)' on null object reference  07-23 15:51:02.230: e/androidruntime(14857): @ com.box.boxandroidlibv2.activities.oauthactivity.createoauthwebview(oauthactivity.java:78)  07-23 15:51:02.230: e/androidruntime(14857): @ com.box.boxandroidlibv2.activities.oauthactivity.startoauth(oauthactivity.java:66)  07-23 15:51:02.230: e/androidruntime(14857): @ com.box.boxandroidlibv2.activities.oauthactivity.oncreate(oauthactivity.java:52)  07-23 15:51:02.230: e/androidruntime(14857): @ android.app.activity.performcreate(activity.java:5958)  07-23 15:51:02.230: e/androidruntime(14857): @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1129)  07-23 15:51:02.230: e/androidruntime(14857): @ android.app.activitythread.performlaunchactivity(activitythread.java:2364)  07-23 15:51:02.230: e/androidruntime(14857): ... 10 more 

please suggest me resolve problem.

with regards,

babu kaliyamoorthy.

like comments say, cannot know without more code wrong. looking closer @ nullpointerexception, seems pretty common problem oauth , webviews. can see oauthwebview null object likely. means need create web view never created it.

the sample speak of might have had webview built android .xml files or in activity or forgot code. check on carefully, , if can post code. post code on create oauthwebview. seems after setting custom webview oauthwebview error should go away.

java.lang.nullpointerexception: attempt invoke virtual method 'void com.box.boxandroidlibv2.views.oauthwebview.setallowshowingredirectpage(boolean)' on null object reference

when attempt invoke virtual method -blahblahblah- on null object reference backwards , see last function, aka virtual method, call (in case setallowingshowingredirectpage(boolean)) , null object object called function, oauthwebview.

this happens twice in stack trace creation or management of instance of oauthwebview problem.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -