Sto integrando BOX.COM
con la mia applicazione Android. Quindi sto usando BoxAndroidLibraryV2
e BoxJavaLibraryV2
con la mia applicazione. Potrei eseguire l'applicazione Android di esempio BoxSDKSample
. Così ho copiato la classe e i layout necessari dall'applicazione di esempio. Ora ricevo il messaggio di errore come segue.Integrazione Box.COM con un'app Android-OAuthActivity-Nullpointerexception?
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 to start activity ComponentInfo{com.filenet.ecm/com.box.boxandroidlibv2.activities.OAuthActivity} : java.lang.NullPointerException: Attempt to invoke virtual method 'void com.box.boxandroidlibv2.views.OAuthWebView.setAllowShowingRedirectPage(boolean)' on a null object reference
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2474)
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.app.ActivityThread.access$800(ActivityThread.java:144)
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1359)
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.os.Handler.dispatchMessage(Handler.java:102)
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.os.Looper.loop(Looper.java:155)
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.app.ActivityThread.main(ActivityThread.java:5696)
07-23 15:51:02.230: E/AndroidRuntime(14857): at java.lang.reflect.Method.invoke(Native Method)
07-23 15:51:02.230: E/AndroidRuntime(14857): at java.lang.reflect.Method.invoke(Method.java:372)
07-23 15:51:02.230: E/AndroidRuntime(14857): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
07-23 15:51:02.230: E/AndroidRuntime(14857): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
07-23 15:51:02.230: E/AndroidRuntime(14857): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.box.boxandroidlibv2.views.OAuthWebView.setAllowShowingRedirectPage(boolean)' on a null object reference
07-23 15:51:02.230: E/AndroidRuntime(14857): at com.box.boxandroidlibv2.activities.OAuthActivity.createOAuthWebView(OAuthActivity.java:78)
07-23 15:51:02.230: E/AndroidRuntime(14857): at com.box.boxandroidlibv2.activities.OAuthActivity.startOAuth(OAuthActivity.java:66)
07-23 15:51:02.230: E/AndroidRuntime(14857): at com.box.boxandroidlibv2.activities.OAuthActivity.onCreate(OAuthActivity.java:52)
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.app.Activity.performCreate(Activity.java:5958)
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129)
07-23 15:51:02.230: E/AndroidRuntime(14857): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
07-23 15:51:02.230: E/AndroidRuntime(14857): ... 10 more
Si prega di suggerire di risolvere questo problema.
Per quanto riguarda,
Babu Kaliyamoorthy.
Si prega di fornire un codice – Skynet
Babu, pubblicare il tuo codice di quello che hai provato finora. –