问题'你好Android的教程 [英] Issue with 'Hello Android' tutorial

查看:73
本文介绍了问题'你好Android的教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是全新的Eclipse和Android,但有些熟悉Java。话虽如此,我尝试使用最新的Eclipse(Galieo)和2.1 Android SDK中,我在Macintosh上运行的雪豹(OS X 10.6)遵循'你好Android的从开发者网站的教程。我有一个默认的虚拟设备(虽然我的目标实际上是手机像我自己的HTC不可思议它具有Snapdragon处理器,当然所有最新的装扮在智能手机)。

一切似乎好走,直到我去 RUN>运行然后再选择Android应用程序。我的电脑旋转车轮一会儿,然后我看到两个错误。我已经贴了输出的Eclipse如下:

  [2010-05-04 1点53分46秒 -  HelloAndroid] ------------------------ ------
[2010-05-04 1时53分46秒 -  HelloAndroid] Android的推出!
[2010-05-04 1时53分46秒 -  HelloAndroid]亚洲开发银行运行正常。
[2010-05-04 1时53分46秒 -  HelloAndroid]执行com.example.helloandroid.HelloAndroid活动启动
[2010-05-04 1时53分46秒 -  HelloAndroid]自动目标模式:启动新的仿真器兼容AVDmyAVD
[2010-05-04 1时53分46秒 -  HelloAndroid]启动一个新的仿真与虚拟设备myAVD
[2010-05-04 1时53分58秒 -  HelloAndroid]研究发现新的模拟器:模拟器-5554
[2010-05-04 1时53分58秒 -  HelloAndroid]等待HOME('android.process.acore)即将推出...
[2010-05-04 1点53分59秒 - 模拟器] 2010-05-04 01:53:59.501模拟器[10398:903]警告一次:本申请,或它使用的库,在使用NSQuickDrawView,这已经被解precated。应用程序应该停止使用的QuickDraw,并转移到石英。
[2010-05-04一点54分23秒 -  HelloAndroid]仿真器 -  5554断开!消com.example.helloandroid.HelloAndroid活动推出的!
 

我从来不做看到一个关于它的意外辞职的消息在模拟器中的文字和仿真器崩溃。

崩溃报告中指出:

 流程:模拟器[10472]
路径:/应用/ Android的SDK-mac_86 /工具/仿真器
标识符:模拟器
版:         ??? (???)
code型号:X86(母语)
父进程:月食[10468]

日期/时间:2010-05-04 02:25:41.153 -0500
操作系统版本:Mac OS X的10.6.3(10D573)
报告版本:6

时间间隔自上次报告:2558914秒
崩溃自上次报告:4
每应用程序崩溃自上次报告:2
匿名UUID:C5F178C1-5290-4CA9-AD6E-E9C4F5582754

异常类型:EXC_BAD_ACCESS(SIGSEGV)
异常codeS:KERN_INVALID_ADDRESS在0x000000001fd2f000
崩溃主题:3
 

注:在命令行与运行模拟器:

  iainnitro-mac:在工具iainnitro $ ./emulator -avd myAVD

2010-05-04 02:49:23.011模拟器[10556:903]警告一次:本申请,或库它
使用,是使用NSQuickDrawView,这一直是德pcated $ P $。应用程序应该停止使用的QuickDraw的
并移动到石英。
分段故障
iainnitro-mac:在工具iainnitro $
 

产生分段错误(从终端输出如上所述)。因此,仿真器死在了自己的东西,才能显示。

我曾尝试重新启动亚行的过程。

实际的code是本教程一行行,我从来没有能够得到的XML的部分呢。

我不知道有什么不对我的环境设置,或者如果它只是一个不兼容雪豹?我真的AP preciate解决这个我在开发这个平台非常感兴趣的任何帮助。

感谢 - 你,

迈克ñ劳伦斯,堪萨斯州

解决方案

没有直接的经验,但是这似乎是一个经常性的问题:

这个线程提示:

  

您还没有让模拟器启动一路上扬。开始,然后是等待,直到你看到一个桌面,就像在真正的手机。

这其中提到(我怀疑点1是不关心你):

  
      
  1. 得到更多的内存。我是256 MB(我相信这是低于最低要求)上运行的,今天刚升级到1024 MB(很长时间),应用程序现在开始罚款。虽然我还是看到在模拟器中的一些错误消息,他们似乎并没有真正做任何事情。

  2.   
  3. 这是命令行安装。这是一个有点laborius,但你可以在命令行启动一个仿真器(假设< Android SDK中的路径> \工具添加到您的PATH变量),只需要输入模拟器,然后浏览到 your_app_here.apk 的位置,并执行

  4.   

  ADB安装your_app_here.apk
 

  

如果从Eclipse启动模拟器,执行 ADB杀死服务然后亚行启动服务第一(或杀死服务器 / 启动服务器,不知道确切的命令)。那么你的应用程序将被安装到仿真器。


另外(有点老,但可能仍然是相关

  

也许模拟器运行这么慢,和亚洲开发银行的服务器,或像DDMS另一个组件是一个有点绝望,因为看起来它等待模拟器iniatialize的一些首页 aplication。
  但仿真运行速度慢,在Eclipse控制台发送一条消息:模拟器-5554   断开!取消com.android.hello.HelloAndroid推出;!和仿真器继续正常运行,并启动它的系统,但不运行的应用程序,我建立

     

因此,对于这个问题我运行程序,仿真器打开时,我回去DDMS透视和设备标签ŸpreSS按钮重启亚行到eclipse服务器控制台显示我的消息之前,模拟器-5554断开!
  我做了好几次,直到最终模拟器启动操作系统。
  启动后在模拟器上的OS,日食不发送断开连接错误,并发出我建立的应用程序,也控制台显示这个消息。
  后来终于出现在手机的Hello,Android的。

I am brand new to Eclipse and Android, but somewhat familiar with Java. That having been said, I tried to follow the 'Hello Android' tutorial from the developer site using the latest Eclipse (Galieo) and the 2.1 Android SDK, I am on a Macintosh running Snow Leopard (OS X 10.6). I have a default virtual device (though my target is actually for phones like my own HTC Incredible which has the snapdragon processor and of course all the latest accoutrement in smart phones).

Everything seemed to go okay until I went to RUN>RUN and then selected 'Android Application'. My computer spins its wheels for a while and then I see two errors. I have pasted the output from Eclipse below:

[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'!

I never do see the text in the emulator and the emulator crashes with a message about it quitting unexpectedly.

The crash report states:

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

NOTE: Running the emulator from the command line with:

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$

yields a segmentation fault(as noted above from the terminal output). So the emulator is dying on its own before anything can be shown.

I have tried restarting the ADB processes.

The actual code is line by line from the tutorial and I have never been able to get to the XML part yet.

I am not sure what is wrong with my environment setup or if it is just an incompatibility with Snow Leopard? I would REALLY appreciate any help in resolving this as I am very interested in developing on this platform.

Thank-you,

Mike N Lawrence, Kansas

解决方案

No direct experience, but this seems to be a recurrent issue:

This thread suggests:

You haven't let the emulator boot all the way up. Start it then wait until you see a desktop, just like on a real phone.

This one mentions (I suspect point 1. is not a concern for you):

  1. Get more RAM. I was running on 256 MB (which I believe is below minimum requirements), just upgraded today to 1024 MB (long time coming), application now starts fine. Although I still do see some error messages in the emulator, they don't seem to actually do anything.

  2. Install from command line. This is a bit laborius, but you can launch an emulator from the command line (assuming <android sdk path>\tools is added to your PATH variable) just type emulator, then browse to the location of your_app_here.apk, and execute

adb install your_app_here.apk

If you launch the emulator from Eclipse, execute adb kill-service and then adb start-service first (or kill-server / start-server. not sure the exact commands). Then your app will be installed on the emulator.


Also (a bit old but might still be relevant)

Maybe the emulator is running so slow, and the adb server, or another component like "DDMS" is a little "desperate" because seems it's waiting to the emulator to iniatialize the some HOME aplication.
But the emulator is running slow, the console in Eclipse send a message: emulator-5554 disconnected! Cancelling 'com.android.hello.HelloAndroid' launch!; and the emulator continues running normally and boot it's system, but don't run application that I build.

So for that problem I run program, and when the emulator is opened, I go back to eclipse in DDMS Perspective and in the Device tab y press a button "restart adb server" before the console shows me the message of "emulator-5554 disconnected!".
I do it several times until the emulator finally boot the OS.
After booted the OS on the emulator, eclipse don't send that disconnect error, and "sends" the app that I've built, also the console shows messages about this.
Then finally appears on the mobile "Hello, Android".

这篇关于问题'你好Android的教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆