當我嘗試調試與NetBeans和nbandroid插件的Android應用程序,它會啓動模擬器,並最終當模擬器出現它說等待對於調試Android上使用NetBeans
等待對於調試
應用程序[app name]([package name])正在等待調試器附加。
我得到一個強制關閉按鈕。
以下是來自DDMS的日誌。
01-14 11:44:46.131: INFO/ActivityManager(85): Force stopping package [packagename] uid=-1
01-14 11:44:46.131: INFO/ActivityManager(85): Starting activity: Intent { flg=0x10000000 cmp=[packagename]/.[activityclassname] }
01-14 11:44:46.311: DEBUG/AndroidRuntime(420): Shutting down VM
01-14 11:44:46.331: DEBUG/jdwp(420): adbd disconnected
01-14 11:44:46.371: INFO/AndroidRuntime(420): NOTE: attach of thread 'Binder Thread #3' failed
01-14 11:44:46.411: INFO/ActivityManager(85): Start proc [packagename] for activity [packagename]/.[activityclassname]: pid=427 uid=10032 gids={3003}
01-14 11:44:47.200: WARN/ActivityThread(427): Application [packagename] is waiting for the debugger on port 8100...
01-14 11:44:47.231: INFO/System.out(427): Sending WAIT chunk
01-14 11:44:50.280: DEBUG/SntpClient(85): request time failed: java.net.SocketException: Address family not supported by protocol
01-14 11:44:56.253: WARN/ActivityManager(85): Launch timeout has expired, giving up wake lock!
01-14 11:44:57.003: WARN/ActivityManager(85): Activity idle timeout for HistoryRecord{43f85578 [packagename]/.[activityclassname]}
01-14 11:45:05.350: DEBUG/dalvikvm(166): GC_EXPLICIT freed 595 objects/29656 bytes in 120ms
01-14 11:45:10.320: DEBUG/dalvikvm(228): GC_EXPLICIT freed 190 objects/13056 bytes in 92ms
01-14 11:45:15.331: DEBUG/dalvikvm(304): GC_EXPLICIT freed 277 objects/13112 bytes in 92ms
01-14 11:45:20.401: DEBUG/dalvikvm(162): GC_EXPLICIT freed 586 objects/32240 bytes in 109ms
01-14 11:47:05.161: DEBUG/dalvikvm(162): GC_EXPLICIT freed 49 objects/2704 bytes in 93ms
01-14 11:49:05.201: DEBUG/dalvikvm(162): GC_EXPLICIT freed 15 objects/600 bytes in 130ms
01-14 11:49:47.595: INFO/jdwp(85): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.710: INFO/jdwp(155): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.740: INFO/jdwp(160): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.750: INFO/jdwp(162): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.772: INFO/jdwp(166): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.810: INFO/jdwp(194): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.820: INFO/jdwp(224): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.861: INFO/jdwp(228): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.872: INFO/jdwp(242): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.880: INFO/jdwp(271): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.980: INFO/jdwp(427): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.980: INFO/jdwp(304): Ignoring second debugger -- accepting and dropping
01-14 11:49:47.980: INFO/jdwp(337): Ignoring second debugger -- accepting and dropping
01-14 11:49:48.020: INFO/jdwp(293): Ignoring second debugger -- accepting and dropping
01-14 11:49:50.290: DEBUG/SntpClient(85): request time failed: java.net.SocketException: Address family not supported by protocol
01-14 11:50:10.970: DEBUG/Email(271): *** synchronizeMailboxGeneric ***
01-14 11:50:11.250: DEBUG/dalvikvm(271): GC_FOR_MALLOC freed 9369 objects/455104 bytes in 126ms
01-14 11:51:05.171: DEBUG/dalvikvm(162): GC_EXPLICIT freed 15 objects/600 bytes in 90ms
01-14 11:53:05.180: DEBUG/dalvikvm(162): GC_EXPLICIT freed 15 objects/600 bytes in 95ms
01-14 11:54:50.293: DEBUG/SntpClient(85): request time failed: java.net.SocketException: Address family not supported by protocol
這裏是NetBeans的螞蟻日誌
init:
deps-jar:
Compiling 1 source file to C:\[apppath]\build\classes
compile:
Updating zip: C:\[apppath]\dist\[appname].apk_
THIS TOOL IS DEPRECATED. See --help for more information.
Deleting: C:\[appdir]\dist\[appname].apk_
Deleting: C:\[apppath]\dist\[appname].apk__
Building zip: C:\[apppath].zip
jar:
pkg: /data/local/tmp/[appname].apk
Success
569 KB/s (275945 bytes in 0.473s)
About to start [packagename]/[packagename].[activityclassname]
Starting: Intent { cmp=[packagenamel]/.[activityclassname] }
的NetBeans告訴我該進程仍在運行,並給了我一個停止按鈕「殺」,如果我想。
此外我的CPU和磁盤大部分空閒。
謝謝,Eclipse同時運行的事實搞砸了調試器的連接。關閉Eclipse,這一切都按預期進行=) – Ted 2011-08-31 08:52:51