0

尝试在 Gingerbread 模拟器上运行我的 Android 应用程序时出现此错误:

09-11 02:18:04.540: I/PhoneGapLog(342): phonegap.xml missing. Ignoring...
09-11 02:18:04.540: I/System.out(342): loadUrl(file:///android_asset/www/app.html)
09-11 02:18:04.550: I/System.out(342): url=file:///android_asset/www/app.html baseUrl=file:///android_asset/www/
09-11 02:18:05.150: D/SoftKeyboardDetect(342): We are in our onMeasure method
09-11 02:18:05.150: D/SoftKeyboardDetect(342): Old Height = 0
09-11 02:18:05.150: D/SoftKeyboardDetect(342): Height = 762
09-11 02:18:05.150: D/SoftKeyboardDetect(342): Old Width = 0
09-11 02:18:05.150: D/SoftKeyboardDetect(342): Width = 480
09-11 02:18:05.150: D/SoftKeyboardDetect(342): Ignore this event
09-11 02:18:05.332: D/SoftKeyboardDetect(342): We are in our onMeasure method
09-11 02:18:05.332: D/SoftKeyboardDetect(342): Old Height = 762
09-11 02:18:05.340: D/SoftKeyboardDetect(342): Height = 762
09-11 02:18:05.340: D/SoftKeyboardDetect(342): Old Width = 480
09-11 02:18:05.340: D/SoftKeyboardDetect(342): Width = 480
09-11 02:18:05.370: D/SoftKeyboardDetect(342): Ignore this event
09-11 02:18:24.910: I/System.out(342): onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=file:///android_asset/www/app.html
09-11 02:18:28.920: E/WindowManager(342): Activity com.ohla.OhlaActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4057a2f8 that was originally added here
09-11 02:18:28.920: E/WindowManager(342): android.view.WindowLeaked: Activity com.ohla.OhlaActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4057a2f8 that was originally added here
09-11 02:18:28.920: E/WindowManager(342):   at android.view.ViewRoot.<init>(ViewRoot.java:258)
09-11 02:18:28.920: E/WindowManager(342):   at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
09-11 02:18:28.920: E/WindowManager(342):   at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
09-11 02:18:28.920: E/WindowManager(342):   at android.view.Window$LocalWindowManager.addView(Window.java:424)
09-11 02:18:28.920: E/WindowManager(342):   at android.app.Dialog.show(Dialog.java:241)
09-11 02:18:28.920: E/WindowManager(342):   at android.app.AlertDialog$Builder.show(AlertDialog.java:802)
09-11 02:18:28.920: E/WindowManager(342):   at com.phonegap.DroidGap$6.run(DroidGap.java:1483)
09-11 02:18:28.920: E/WindowManager(342):   at android.os.Handler.handleCallback(Handler.java:587)
09-11 02:18:28.920: E/WindowManager(342):   at android.os.Handler.dispatchMessage(Handler.java:92)
09-11 02:18:28.920: E/WindowManager(342):   at android.os.Looper.loop(Looper.java:123)
09-11 02:18:28.920: E/WindowManager(342):   at android.app.ActivityThread.main(ActivityThread.java:3683)
09-11 02:18:28.920: E/WindowManager(342):   at java.lang.reflect.Method.invokeNative(Native Method)
09-11 02:18:28.920: E/WindowManager(342):   at java.lang.reflect.Method.invoke(Method.java:507)
09-11 02:18:28.920: E/WindowManager(342):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-11 02:18:28.920: E/WindowManager(342):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-11 02:18:28.920: E/WindowManager(342):   at dalvik.system.NativeStart.main(Native Method)
09-11 02:18:28.920: E/WindowManager(342): Activity com.ohla.OhlaActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4057a2f8 that was originally added here
09-11 02:18:28.920: E/WindowManager(342): android.view.WindowLeaked: Activity com.ohla.OhlaActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4057a2f8 that was originally added here
09-11 02:18:28.920: E/WindowManager(342):   at android.view.ViewRoot.<init>(ViewRoot.java:258)
09-11 02:18:28.920: E/WindowManager(342):   at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
09-11 02:18:28.920: E/WindowManager(342):   at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
09-11 02:18:28.920: E/WindowManager(342):   at android.view.Window$LocalWindowManager.addView(Window.java:424)
09-11 02:18:28.920: E/WindowManager(342):   at android.app.Dialog.show(Dialog.java:241)
09-11 02:18:28.920: E/WindowManager(342):   at android.app.AlertDialog$Builder.show(AlertDialog.java:802)
09-11 02:18:28.920: E/WindowManager(342):   at com.phonegap.DroidGap$6.run(DroidGap.java:1483)
09-11 02:18:28.920: E/WindowManager(342):   at android.os.Handler.handleCallback(Handler.java:587)
09-11 02:18:28.920: E/WindowManager(342):   at android.os.Handler.dispatchMessage(Handler.java:92)
09-11 02:18:28.920: E/WindowManager(342):   at android.os.Looper.loop(Looper.java:123)
09-11 02:18:28.920: E/WindowManager(342):   at android.app.ActivityThread.main(ActivityThread.java:3683)
09-11 02:18:28.920: E/WindowManager(342):   at java.lang.reflect.Method.invokeNative(Native Method)
09-11 02:18:28.920: E/WindowManager(342):   at java.lang.reflect.Method.invoke(Method.java:507)
09-11 02:18:28.920: E/WindowManager(342):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-11 02:18:28.920: E/WindowManager(342):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-11 02:18:28.920: E/WindowManager(342):   at dalvik.system.NativeStart.main(Native Method)
09-11 02:18:33.549: D/dalvikvm(342): GC_EXPLICIT freed 396K, 55% free 2929K/6407K, external 2388K/2982K, paused 77ms

如何修复此Activity com.ohla.OhlaActivity has leaked window错误?这与文件assets/www夹中的 Web 应用程序文件有关吗?但是,当我assets/www在桌面浏览器中运行 Web 应用程序时,完全没有问题。

我正在使用 Sencha Touch 开发网络应用程序。当我在模拟器中运行 PhoneGap 应用程序时,会显示以下错误消息:The connection to server was unsuccessful. (file:///android_asset/www/app.html)

4

0 回答 0