我正在使用蜂窝设备来测试我的应用程序,无论出于何种原因,应用程序运行都没有任何内容布局设置。它曾经运行良好,它突然开始显示只是黑色。其他应用程序运行正常,甚至eclipse的新测试应用也运行良好。
运行上的Logcat :
09-22 23:07:07.955: DEBUG/AndroidRuntime(16269): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-22 23:07:07.955: DEBUG/AndroidRuntime(16269): CheckJNI is ON
09-22 23:07:08.203: DEBUG/AndroidRuntime(16269): Calling main entry com.android.commands.pm.Pm
09-22 23:07:08.251: DEBUG/dalvikvm(1633): GC_EXPLICIT freed 10K, 16% free 2666K/3139K, paused 1ms+1ms
09-22 23:07:08.251: WARN/ActivityManager(164): No content provider found for:
09-22 23:07:08.343: WARN/ActivityManager(164): No content provider found for:
09-22 23:07:08.347: DEBUG/PackageParser(164): Scanning package: /data/app/vmdl503116950.tmp
09-22 23:07:08.423: INFO/PackageManager(164): Removing non-system package:com.test.tv
09-22 23:07:08.423: INFO/Process(164): Sending signal. PID: 16153 SIG: 9
09-22 23:07:08.423: INFO/ActivityManager(164): Force stopping package com.test.tv uid=10026
09-22 23:07:08.471: DEBUG/dalvikvm(284): GC_EXPLICIT freed 13K, 24% free 3540K/4615K, paused 2ms+2ms
09-22 23:07:08.559: DEBUG/dalvikvm(611): GC_EXPLICIT freed <1K, 19% free 5940K/7303K, paused 20ms+7ms
09-22 23:07:08.583: DEBUG/dalvikvm(465): GC_EXPLICIT freed 4K, 60% free 5733K/14087K, paused 50ms+6ms
09-22 23:07:08.723: DEBUG/dalvikvm(164): GC_CONCURRENT freed 1557K, 55% free 9969K/21831K, paused 2ms+6ms
09-22 23:07:08.759: DEBUG/PackageManager(164): Scanning package com.test.tv
09-22 23:07:08.759: INFO/PackageManager(164): Package com.test.tv codePath changed from /data/app/com.test.tv-1.apk to /data/app/com.test.tv-2.apk; Retaining data and using new
09-22 23:07:08.759: INFO/PackageManager(164): Unpacking native libraries for /data/app/com.test.tv-2.apk
09-22 23:07:08.775: DEBUG/installd(116): DexInv: --- BEGIN '/data/app/com.test.tv-2.apk' ---
09-22 23:07:08.879: DEBUG/dalvikvm(16278): DexOpt: load 5ms, verify+opt 53ms
09-22 23:07:08.891: DEBUG/installd(116): DexInv: --- END '/data/app/com.test.tv-2.apk' (success) ---
09-22 23:07:08.891: DEBUG/PackageManager(164): Activities: com.test.tv.TestActivity com.test.tv.FullscreenActivity
09-22 23:07:08.891: INFO/ActivityManager(164): Force stopping package com.test.tv uid=10026
09-22 23:07:08.891: WARN/PackageManager(164): Code path for pkg : com.test.tv changing from /data/app/com.test.tv-1.apk to /data/app/com.test.tv-2.apk
09-22 23:07:08.891: WARN/PackageManager(164): Resource path for pkg : com.test.tv changing from /data/app/com.test.tv-1.apk to /data/app/com.test.tv-2.apk
09-22 23:07:08.951: INFO/installd(116): move /data/dalvik-cache/data@app@com.test.tv-2.apk@classes.dex -> /data/dalvik-cache/data@app@com.test.tv-2.apk@classes.dex
09-22 23:07:08.951: DEBUG/PackageManager(164): New package installed in /data/app/com.test.tv-2.apk
09-22 23:07:09.011: INFO/ActivityManager(164): Force stopping package com.test.tv uid=10026
09-22 23:07:09.075: DEBUG/dalvikvm(360): GC_EXPLICIT freed 72K, 16% free 2883K/3399K, paused 1ms+1ms
09-22 23:07:09.099: DEBUG/dalvikvm(236): GC_EXPLICIT freed 25K, 32% free 10096K/14727K, paused 2ms+3ms
09-22 23:07:09.111: DEBUG/PackageManager(164): generateServicesMap(android.accounts.AccountAuthenticator): 1 services unchanged
09-22 23:07:09.119: DEBUG/PackageManager(164): generateServicesMap(android.content.SyncAdapter): 1 services unchanged
09-22 23:07:09.131: DEBUG/PackageManager(164): generateServicesMap(android.accounts.AccountAuthenticator): 1 services unchanged
09-22 23:07:09.131: DEBUG/PackageManager(164): generateServicesMap(android.content.SyncAdapter): 1 services unchanged
09-22 23:07:09.143: DEBUG/GTalkService(284): [GTalkService.1] handlePackageInstalled: re-initialize providers
09-22 23:07:09.143: DEBUG/GTalkService(284): [RawStanzaProvidersMgr] ##### searchProvidersFromIntent
09-22 23:07:09.147: DEBUG/GTalkService(284): [RawStanzaProvidersMgr] no intent receivers found
09-22 23:07:09.159: WARN/RecognitionManagerService(164): no available voice recognition services found
09-22 23:07:09.271: DEBUG/dalvikvm(164): GC_EXPLICIT freed 681K, 56% free 9810K/21831K, paused 2ms+5ms
09-22 23:07:09.275: INFO/installd(116): unlink /data/dalvik-cache/data@app@com.test.tv-1.apk@classes.dex
09-22 23:07:09.279: DEBUG/AndroidRuntime(16269): Shutting down VM
09-22 23:07:09.295: INFO/AndroidRuntime(16269): NOTE: attach of thread 'Binder Thread #3' failed
09-22 23:07:09.295: DEBUG/dalvikvm(16269): GC_CONCURRENT freed 98K, 87% free 338K/2560K, paused 1ms+1ms
09-22 23:07:09.295: DEBUG/jdwp(16269): Got wake-up signal, bailing out of select
09-22 23:07:09.295: DEBUG/dalvikvm(16269): Debugger has detached; object registry had 1 entries
09-22 23:07:09.531: DEBUG/AndroidRuntime(16285): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-22 23:07:09.531: DEBUG/AndroidRuntime(16285): CheckJNI is ON
09-22 23:07:09.699: DEBUG/AndroidRuntime(16285): Calling main entry com.android.commands.am.Am
09-22 23:07:09.711: INFO/ActivityManager(164): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.test.tv/.TestActivity } from pid 16285
09-22 23:07:09.727: INFO/ActivityManager(164): Start proc com.test.tv for activity com.test.tv/.TestActivity: pid=16292 uid=10026 gids={3003}
09-22 23:07:09.735: DEBUG/AndroidRuntime(16285): Shutting down VM
09-22 23:07:09.743: INFO/AndroidRuntime(16285): NOTE: attach of thread 'Binder Thread #3' failed
09-22 23:07:09.751: DEBUG/dalvikvm(16285): GC_CONCURRENT freed 99K, 86% free 365K/2560K, paused 0ms+1ms
09-22 23:07:09.751: DEBUG/jdwp(16285): Got wake-up signal, bailing out of select
09-22 23:07:09.751: DEBUG/dalvikvm(16285): Debugger has detached; object registry had 1 entries
09-22 23:07:09.787: ERROR/jdwp(16292): Failed sending reply to debugger: Broken pipe
09-22 23:07:09.787: DEBUG/dalvikvm(16292): Debugger has detached; object registry had 1 entries
09-22 23:07:10.151: INFO/ActivityManager(164): Displayed com.test.tv/.TestActivity: +425ms
09-22 23:07:10.271: DEBUG/dalvikvm(236): GC_EXPLICIT freed 264K, 31% free 10199K/14727K, paused 3ms+4ms
清单:
<application android:icon="@drawable/logo" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:label="@string/app_name">
<activity android:name=".TestActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="FullscreenActivity">
<intent-filter>
<action android:name="com.test.tv" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
**编辑发现问题 **
问题出现在{{1>}的默认活动(在我的情况下为onCreate
)。 Eclipse已经向TestActivity
函数添加了太多参数,并且显然已停止运行该函数,但日志中根本没有错误。一旦那些额外的参数被删除,一切都会回到正常。
答案 0 :(得分:0)
问题出现在{{1>}的默认活动(在我的情况下为onCreate
)。 Eclipse已经向TestActivity
函数添加了太多参数,并且显然已停止运行该函数,但日志中根本没有错误。一旦那些额外的参数被删除,一切都会回到正常。