【发布时间】:2010-05-04 06:58:46
【问题描述】:
我是 Eclipse 和 Android 的新手,但对 Java 有点熟悉。话虽如此,我尝试使用最新的 Eclipse (Galieo) 和 2.1 Android SDK 来遵循开发者网站上的“Hello Android”教程,我在运行 Snow Leopard (OS X 10.6) 的 Macintosh 上。我有一个默认的虚拟设备(虽然我的目标实际上是我自己的 HTC Incredible 之类的手机,它配备了 snapdragon 处理器,当然还有智能手机中的所有最新装备)。
在我转到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 不兼容?我非常感谢任何帮助解决这个问题,因为我对在这个平台上开发非常感兴趣。
谢谢,
迈克·N·劳伦斯,堪萨斯州
【问题讨论】:
-
QuickDraw --> Quartz 警告就是这样;当我构建教程时,我也遇到了它,并认为它是我在使用模拟器时遇到的问题的原因——但我只是没有等待足够长的时间让模拟器启动。因此,如果您担心 Quartz,请不要担心。