开发者

Newbie cannot program Hello world app

开发者 https://www.devze.com 2022-12-18 11:25 出处:网络
I recently downloaded Eclipse (Galileo), the Android SDK and Java.I followed instructions to write the \"Hello World\" app http://developer.android.com/guide/tutorials/hello-world.html from the develo

I recently downloaded Eclipse (Galileo), the Android SDK and Java. I followed instructions to write the "Hello World" app http://developer.android.com/guide/tutorials/hello-world.html from the developers'webpage and ran the app.开发者_如何学编程 a window opens with a phone screen that reads "ANDROID" on the left and a keyboard image on the right. It does not resemble the image on the webpage, wherein the result should read Hello Android.

Last p.m. I tried several times to run 2 messages appeared in the Console of the Eclipse SDK program:

Hello Android]ActivityManager: Can't dispatch DDM chunk 46454154: no handler defined

Hello Android]ActivityManager: Error: Unable to connect to activity manager; is the system running?

How do I correct? Thank you.


The "Android" on the left is just the emulator starting up. You see, it's actually a full-on emulated environment running inside a virtual machine so it takes a little time to start. If you let it finish booting up you should be able to run your program in it.


Having just entered the world of Android/Eclipse/Java (on MAC-OSX 10.6) etc., I went down exactly the same path and had EXACTLY the same experience. Here's a few "First Timer" tips I'd like to offer you...

A. Things take time... to refresh your components, to launch the emulator, to load a new/old project, etc. I am running on a screaming MACBook Pro and --- Things Take Time.

B. "Eclipse" is NOT Visual Studio. e.g. To open a demo project you'd think "PROJECT - > OPEN..." bzzzzt. Wrong answer.. you "IMPORT..." into your current WORKSPACE. The workspace seems like the VS "Solution" space ... but early impressions tells me its probably A LOT more than that.

C. The DEFAULT PORT Number for attaching DDMS (the debugger) to your emulator is WRONG. My Version of Eclipse-Galileo (downloaded just yesterday) has the TCP port for connecting to the emulator set as default to 8600.... I could NOT get the d@rn thing to attach. I had read (somewhere --> starting a brand new development adventure like this always means a ton of reading up front) that the emulator really wants to talk on port 8200. I went into the PROPERTIES of DDMS and made the change and viola'

And finally,

D. Pay attention to the little "progress bar" in the lower right-hand corner of the IDE. I am amazed at how many times it wakes up by me pressing some "refresh" or other button... see A.

regards, tob

0

精彩评论

暂无评论...
验证码 换一张
取 消