【发布时间】:2014-04-26 09:53:20
【问题描述】:
在我的应用程序中,在 Web 视图中加载网页,直到该网页加载需要在该进度条消失后显示进度条..我正在使用一个活动..很快回复我等待您的回答
04-26 18:02:36.791: D/AndroidRuntime(25114): Shutting down VM
04-26 18:02:36.791: W/dalvikvm(25114): threadid=1: thread exiting with uncaught exception (group=0x41250438)
04-26 18:02:36.811: E/AndroidRuntime(25114): FATAL EXCEPTION: main
04-26 18:02:36.811: E/AndroidRuntime(25114): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{in.androidapplicationdotin.tneb/in.androidapplicationdotin.tneb.Onlinepayment}: java.lang.NullPointerException
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2038)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2139)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.ActivityThread.access$700(ActivityThread.java:143)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.os.Handler.dispatchMessage(Handler.java:99)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.os.Looper.loop(Looper.java:137)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.ActivityThread.main(ActivityThread.java:4960)
04-26 18:02:36.811: E/AndroidRuntime(25114): at java.lang.reflect.Method.invokeNative(Native Method)
04-26 18:02:36.811: E/AndroidRuntime(25114): at java.lang.reflect.Method.invoke(Method.java:511)
04-26 18:02:36.811: E/AndroidRuntime(25114): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
04-26 18:02:36.811: E/AndroidRuntime(25114): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
04-26 18:02:36.811: E/AndroidRuntime(25114): at dalvik.system.NativeStart.main(Native Method)
04-26 18:02:36.811: E/AndroidRuntime(25114): Caused by: java.lang.NullPointerException
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:143)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.view.ContextThemeWrapper.getTheme(ContextThemeWrapper.java:65)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.AlertDialog.resolveDialogTheme(AlertDialog.java:142)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.AlertDialog.<init>(AlertDialog.java:98)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.ProgressDialog.<init>(ProgressDialog.java:77)
04-26 18:02:36.811: E/AndroidRuntime(25114): at in.androidapplicationdotin.tneb.Onlinepayment.<init>(Onlinepayment.java:24)
04-26 18:02:36.811: E/AndroidRuntime(25114): at java.lang.Class.newInstanceImpl(Native Method)
04-26 18:02:36.811: E/AndroidRuntime(25114): at java.lang.Class.newInstance(Class.java:1319)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
04-26 18:02:36.811: E/AndroidRuntime(25114): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2029)
04-26 18:02:36.811: E/AndroidRuntime(25114): ... 11 more
04-26 18:02:42.111: I/GATE(25114): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
04-26 18:03:30.431: I/Ads(25114): AdLoader timed out after 60000ms while loading the HTML.
04-26 18:03:30.571: I/Ads(25114): AdLoader timed out after 60000ms while loading the HTML.
04-26 18:05:44.491: I/Process(25114): Sending signal. PID: 25114 SIG: 9
【问题讨论】:
-
这不是 StackOverflow 的工作方式。您应该先进行研究,然后告诉我们您的尝试。如果您有问题,我们可以提供帮助。你不能只要求代码。
标签: android for-loop progress-bar loading webpage