一区二区三区日韩精品-日韩经典一区二区三区-五月激情综合丁香婷婷-欧美精品中文字幕专区

分享

Activity has leaked window com.android.intern...

 JUST SO LAZY 2013-01-23

Activity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView

分類: Android 4993人閱讀 評論(4) 收藏 舉報

今天程序在樂phone上測出來一個bug:

從頁面內(nèi)退出程序時候第一次退不出去,需要第二次推出才可以。

在DDMS上跟蹤發(fā)現(xiàn)報兩個錯誤:

08-19 13:51:18.286: ERROR/AndroidRuntime(5765): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/.Launcher} 
from ProcessRecord{302a32c0 5765:com.up591.android/10087} 
(pid=5765, uid=10087) requires android.permission.REORDER_TASKS
08-19 14:16:04.576: ERROR/AndroidRuntime(6302): java.lang.SecurityException: 
Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME]
flg=0x10000000 cmp=com.android.launcher/.Launcher } from ProcessRecord{2ffee120 6302:com.up591.android/10087}
(pid=6302, uid=10087) requires android.permission.REORDER_TASKS

以及

08-19 14:17:13.446: ERROR/WindowManager(6428): Activity com.up591.android.view.MainActivity has leaked 
window com.android.internal.policy.impl.PhoneWindow$DecorView@2fd590c8 that was originally added here
08-19 14:17:13.446: ERROR/WindowManager(6428): android.view.WindowLeaked: Activity com.up591.android.view.
MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@2fd590c8 that 
was originally added here
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.view.ViewRoot.<init>(ViewRoot.java:247)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.view.Window$LocalWindowManager.addView(Window.java:444)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.Dialog.show(Dialog.java:248)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at com.up591.android.asyncTasks.NetworkTask.onPreExecute(NetworkTask.java:51)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at com.up591.android.asyncTasks.GetRootCatalogTask.onPreExecute(GetRootCatalogTask.java:38)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.os.AsyncTask.execute(AsyncTask.java:391)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at com.up591.android.view.PractiseActivity.getList(PractiseActivity.java:221)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at com.up591.android.view.PractiseActivity.onAfterCreate(PractiseActivity.java:79)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at com.up591.android.common.BaseActivity.onCreate(BaseActivity.java:122)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2658)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:2534)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:692)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.widget.TabHost.setCurrentTab(TabHost.java:354)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.widget.TabHost.addTab(TabHost.java:230)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at com.up591.android.view.MainActivity.onCreate(MainActivity.java:51)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2658)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2710)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.ActivityThread.access$2300(ActivityThread.java:131)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2049)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.os.Looper.loop(Looper.java:123)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at android.app.ActivityThread.main(ActivityThread.java:4737)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at java.lang.reflect.Method.invokeNative(Native Method)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at java.lang.reflect.Method.invoke(Method.java:521)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
08-19 14:17:13.446: ERROR/WindowManager(6428):     at dalvik.system.NativeStart.main(Native Method)

大概的意思是:第一個是說系統(tǒng)沒有改變Z軸排列任務(wù)的權(quán)限

第二個是說  窗體泄露錯誤

在谷歌后發(fā)現(xiàn)。窗體泄露的原因是有些dialog或則processDialog等引起的。這些空間依附的Activity已經(jīng)關(guān)閉而這些控件還在運行中。所以導(dǎo)致bug

典型的場合是activity 和dialog同時顯示 要先dialog.dismiss() 后activity.finish() 如果直接finish() 會出錯 但不影響功能。


解決的辦法是通過加入android.permission.REORDER_TASKS    權(quán)限解決

目前還不知道是不是因為沒有權(quán)限所以導(dǎo)致樂phone不能夠很好的釋放頁面資源。有待進一步研討

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多

    国产成人精品综合久久久看| 91久久精品在这里色伊人| 精品国产亚洲av久一区二区三区| 欧美久久一区二区精品| 老司机亚洲精品一区二区| 国产av熟女一区二区三区蜜桃| 亚洲国产精品一区二区毛片| 国产传媒欧美日韩成人精品| 五月激情婷婷丁香六月网| 大香蕉精品视频一区二区| 日本免费一区二区三女| 精品国产成人av一区二区三区| 情一色一区二区三区四| 伊人色综合久久伊人婷婷| 欧美尤物在线视频91| 国产内射在线激情一区| 亚洲黄色在线观看免费高清| 日本加勒比不卡二三四区| 日韩美成人免费在线视频| 国产欧美日韩精品一区二区| 欧美日韩成人在线一区| 亚洲国产精品久久精品成人| 精品老司机视频在线观看 | 99久久精品午夜一区| 91香蕉国产观看免费人人| 国产农村妇女成人精品| 日韩精品一区二区毛片| 亚洲高清一区二区高清| 国产肥妇一区二区熟女精品| 国产精品美女午夜福利| 亚洲熟妇中文字幕五十路| 久久这里只精品免费福利| 日本深夜福利在线播放| 小草少妇视频免费看视频| 日韩欧美综合在线播放| 欧美一级日韩中文字幕| 国产福利在线播放麻豆| 熟女白浆精品一区二区| 人妻久久一区二区三区精品99| 国产成人精品国内自产拍| 国产精品伦一区二区三区四季|