我是Eclipse和Android的全新開發者,但對Java有所瞭解。前面已經說過,我試圖使用最新的Eclipse(Galieo)和2.1 Android SDK在開發人員網站上遵循'Hello Android'教程,我使用的是運行Snow Leopard(OS X 10.6)的Macintosh。我有一個默認的虛擬設備(儘管我的目標實際上是針對像我自己的HTC Incredible那樣的手機,它具有snapdragon處理器,當然還有智能手機中最新的配件)。「Hello Android」教程問題
一切似乎都會好起來,直到我去RUN>RUN
,然後選擇'Android應用程序'。我的電腦旋轉了一段時間,然後我看到兩個錯誤。我已經粘貼從下面的Eclipse輸出:
[2010-05-04 01:53:46 - HelloAndroid] ------------------------------
[2010-05-04 01:53:46 - HelloAndroid] Android Launch!
[2010-05-04 01:53:46 - HelloAndroid] adb is running normally.
[2010-05-04 01:53:46 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2010-05-04 01:53:46 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'myAVD'
[2010-05-04 01:53:46 - HelloAndroid] Launching a new emulator with Virtual Device 'myAVD'
[2010-05-04 01:53:58 - HelloAndroid] New emulator found: emulator-5554
[2010-05-04 01:53:58 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2010-05-04 01:53:59 - Emulator] 2010-05-04 01:53:59.501 emulator[10398:903] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
[2010-05-04 01:54:23 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!
我從來不做看到在模擬器中的文本和仿真器崩潰,關於它的意外退出的消息。
碰撞報告指出:
Process: emulator [10472]
Path: /Applications/android-sdk-mac_86/tools/emulator
Identifier: emulator
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: eclipse [10468]
Date/Time: 2010-05-04 02:25:41.153 -0500
OS Version: Mac OS X 10.6.3 (10D573)
Report Version: 6
Interval Since Last Report: 2558914 sec
Crashes Since Last Report: 4
Per-App Crashes Since Last Report: 2
Anonymous UUID: C5F178C1-5290-4CA9-AD6E-E9C4F5582754
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000001fd2f000
Crashed Thread: 3
注:與運行在命令行仿真器:
iainnitro-Mac:tools iainnitro$ ./emulator -avd myAVD
2010-05-04 02:49:23.011 emulator[10556:903] Warning once: This application, or a library it
uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw
and move to Quartz.
Segmentation fault
iainnitro-Mac:tools iainnitro$
產生分段故障(如上面從該終端輸出指出)。所以模擬器在顯示任何東西之前都會自己死掉。
我試過重新啓動ADB過程。
實際的代碼是從教程中逐行寫出來的,我從來沒有能夠到達XML部分。
我不確定我的環境設置出了什麼問題,或者它只是與Snow Leopard不兼容?我真的很感謝任何幫助解決這個問題,因爲我非常有興趣在這個平臺上開發。
感謝信,
邁克ñ勞倫斯,堪薩斯
QuickDraw - > Quartz警告就是這樣;當我編寫教程時,我也遇到了這個問題,並認爲它對我在模擬器中遇到的問題負責 - 但我只是沒有足夠的時間等待模擬器啓動。所以如果你擔心Quartz,不要。 – 2010-05-04 15:28:15