Hello Android - Your first Application

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

UpLoad Files.

Postby venkat » Fri Dec 21, 2007 7:02 am

Sorry for my question here..


regards,
venkat
venkat
Senior Developer
Senior Developer
 
Posts: 152
Joined: Tue Nov 27, 2007 5:42 am
Location: India

Top

Postby plusminus » Fri Dec 21, 2007 4:19 pm

tijames wrote:Well I don't think so (sorry, I'm an uber-nOOb).
Anyway, I first downloaded Eclipse - Europa for mac and got the ADT plugin for it.
Then I downloaded the SDK, put it into my documents, linked eclipse to it and then started trying to create the Hello_Android app. When I tried to run it, it said that the aapt file was unparsed, I looked in the console to see where it is and I found it inside the SDK.
I opened the inspector in mac OS X and read the info on the aapt, it said it was a unix executable file (intel) and I have a PowerPC mac so yeah.... I'm just wondering if there is anyway around the problem?


Sorry, I got no experience with Mac & Android... perhaps someone else :?:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby tijames » Sat Dec 22, 2007 4:08 am

Oh okay, thanks anyway, but who on this forum can I ask?
tijames
Freshman
Freshman
 
Posts: 9
Joined: Thu Dec 20, 2007 3:25 am

Postby plusminus » Sat Dec 22, 2007 4:09 pm

Hello tijames,

everyone who answers ;)
Try opening a new Topic (choose expressive Title) in the SDK/ADT/Emulator Problems-Subforum.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby tijames » Sun Dec 23, 2007 2:06 pm

Thanks. I shall start a topic there, lol ^__^
tijames
Freshman
Freshman
 
Posts: 9
Joined: Thu Dec 20, 2007 3:25 am

step 10 doesnt work

Postby sai » Sun Jun 01, 2008 4:46 am

Hi,

I just got started with Android and your forum seems excellent place to start off. I am using Eclipse Europa on Win XP machine, Java SDK 5. I could follow all the steps but I am stuck at step 9 which you have shown in pictures. I saw on the google forums and added under "Android Preferences" in Eclipse SDK Location: F:GPhoneandroid-sdk_m5-rc15_windows. This took me to a step where I am able to see the emulator but I cannot see the app running. I have added tools dir to the path. I am pasting here the verbose log, kindly help me out.

Thanks,
Sai.

:?:

[2008-06-01 08:50:16 - ddms] Monitor is up
[2008-06-01 08:50:16 - ddms] Checking 'F:GPhoneandroid-sdk_m5-rc15_windowstoolsadb.exe version'
[2008-06-01 08:50:19 - ddms] reopen debug-selected port: 8700
[2008-06-01 08:50:19 - adb] Android Debug Bridge version 1.0.18
[2008-06-01 08:50:19 - ddms] Launching 'F:GPhoneandroid-sdk_m5-rc15_windowstoolsadb.exe start-server' to ensure ADB is running.
[2008-06-01 08:50:23 - adb] * daemon not running. starting it now *
[2008-06-01 08:50:23 - ddms] 'adb start-server' succeeded
[2008-06-01 08:50:23 - DeviceMonitor] Opening adb connection
[2008-06-01 08:50:23 - DeviceMonitor] Connecting to adb for Device List Monitoring...
[2008-06-01 08:50:23 - DeviceMonitor] Connected to adb for device monitoring
[2008-06-01 08:53:29 - DeviceMonitor] Connecting to adb for Device List Monitoring...
[2008-06-01 08:53:54 - ddms] execute: running getprop ro.build.id ; getprop ro.build.date
[2008-06-01 08:54:10 - ddms] execute 'getprop ro.build.id ; getprop ro.build.date' on 'emulator-tcp-5555' : EOF hit. Read: -1
[2008-06-01 08:54:17 - ddms] execute: returning
[2008-06-01 08:55:21 - ddms] Created: [Debugger 8600-->510 inactive]
[2008-06-01 08:55:21 - ddms] Adding new client [Client pid: 510]
[2008-06-01 08:55:30 - ddms] Read 14 bytes from [Client pid: 510]
[2008-06-01 08:55:31 - ddms] Good handshake from client, sending HELO to 510
[2008-06-01 08:55:33 - ddm-hello] Sending HELO ID=0x40000000
[2008-06-01 08:55:33 - ddms] Adding req 0x40000000 to set
[2008-06-01 08:55:37 - ddms] Read 116 bytes from [Client pid: 510]
[2008-06-01 08:55:39 - ddms] Checking 116 bytes
[2008-06-01 08:55:45 - ddms] broadcast 2: [Client pid: 510]
[2008-06-01 08:55:46 - ddm-hello] Now ready: [Client pid: 510]
[2008-06-01 08:55:46 - ddm-thread] Now ready: [Client pid: 510]
[2008-06-01 08:55:47 - ddms] Calling handler for TEST [com.android.ddmlib.HandleTest@15960fd] (len=8)
[2008-06-01 08:55:57 - ddm-test] handling TEST
[2008-06-01 08:55:57 - ddm-test] Received:
[2008-06-01 08:55:57 - ddm-test] 0000- 01 02 03 04 fc fd fe ff ........
[2008-06-01 08:55:57 - ddms] Checking 89 bytes
[2008-06-01 08:55:57 - ddms] Found 0x40000000 in request set - com.android.ddmlib.HandleHello@1fe0dcb
[2008-06-01 08:55:57 - ddms] Found 0x40000000 in request set - com.android.ddmlib.HandleHello@1fe0dcb
[2008-06-01 08:55:57 - ddms] Calling handler for HELO [com.android.ddmlib.HandleHello@1fe0dcb] (len=70)
[2008-06-01 08:55:57 - ddm-hello] handling HELO
[2008-06-01 08:55:58 - ddm-hello] HELO: v=1, pid=510, vm='Dalvik v0.2.0', app='system_process'
[2008-06-01 08:55:59 - ddms] Removing req 0x40000000 from set
[2008-06-01 08:56:04 - ddms] Created: [Debugger 8601-->554 inactive]
[2008-06-01 08:56:04 - ddms] Adding new client [Client pid: 554]
[2008-06-01 08:56:06 - ddms] Read 14 bytes from [Client pid: 554]
[2008-06-01 08:56:07 - ddms] Good handshake from client, sending HELO to 554
[2008-06-01 08:56:07 - ddm-hello] Sending HELO ID=0x40000001
[2008-06-01 08:56:07 - ddms] Adding req 0x40000001 to set
[2008-06-01 08:56:08 - ddms] Read 27 bytes from [Client pid: 554]
[2008-06-01 08:56:12 - ddms] Checking 27 bytes
[2008-06-01 08:56:12 - ddms] broadcast 2: [Client pid: 554]
[2008-06-01 08:56:12 - ddm-hello] Now ready: [Client pid: 554]
[2008-06-01 08:56:12 - ddm-thread] Now ready: [Client pid: 554]
[2008-06-01 08:56:12 - ddms] Calling handler for TEST [com.android.ddmlib.HandleTest@15960fd] (len=8)
[2008-06-01 08:56:12 - ddm-test] handling TEST
[2008-06-01 08:56:12 - ddm-test] Received:
[2008-06-01 08:56:12 - ddm-test] 0000- 01 02 03 04 fc fd fe ff ........
[2008-06-01 08:56:12 - ddms] Read 61 bytes from [Client pid: 554]
[2008-06-01 08:56:12 - ddms] Checking 61 bytes
[2008-06-01 08:56:12 - ddms] Found 0x40000001 in request set - com.android.ddmlib.HandleHello@1fe0dcb
[2008-06-01 08:56:12 - ddms] Found 0x40000001 in request set - com.android.ddmlib.HandleHello@1fe0dcb
[2008-06-01 08:56:12 - ddms] Calling handler for HELO [com.android.ddmlib.HandleHello@1fe0dcb] (len=42)
[2008-06-01 08:56:12 - ddm-hello] handling HELO
[2008-06-01 08:56:12 - ddm-hello] HELO: v=1, pid=554, vm='Dalvik v0.2.0', app=''
[2008-06-01 08:56:12 - ddms] Removing req 0x40000001 from set
[2008-06-01 08:56:15 - ddms] Read 57 bytes from [Client pid: 554]
[2008-06-01 08:56:15 - ddms] Checking 57 bytes
[2008-06-01 08:56:15 - ddms] Calling handler for APNM [com.android.ddmlib.HandleAppName@101f8f4] (len=38)
[2008-06-01 08:56:15 - ddm-appname] handling APNM
[2008-06-01 08:56:15 - ddm-appname] APNM: app='<pre-initialized>'
[2008-06-01 08:56:19 - ddms] Read 75 bytes from [Client pid: 554]
[2008-06-01 08:56:19 - ddms] Checking 75 bytes
[2008-06-01 08:56:19 - ddms] Calling handler for APNM [com.android.ddmlib.HandleAppName@101f8f4] (len=56)
[2008-06-01 08:56:19 - ddm-appname] handling APNM
[2008-06-01 08:56:19 - ddm-appname] APNM: app='com.google.process.content'
[2008-06-01 08:58:23 - ddms] Created: [Debugger 8602-->585 inactive]
[2008-06-01 08:58:23 - ddms] Adding new client [Client pid: 585]
[2008-06-01 08:58:23 - ddms] Read 14 bytes from [Client pid: 585]
[2008-06-01 08:58:23 - ddms] Good handshake from client, sending HELO to 585
[2008-06-01 08:58:23 - ddm-hello] Sending HELO ID=0x40000002
[2008-06-01 08:58:23 - ddms] Adding req 0x40000002 to set
[2008-06-01 08:58:24 - ddms] Read 27 bytes from [Client pid: 585]
[2008-06-01 08:58:26 - ddms] Checking 27 bytes
[2008-06-01 08:58:26 - ddms] broadcast 2: [Client pid: 585]
[2008-06-01 08:58:26 - ddm-hello] Now ready: [Client pid: 585]
[2008-06-01 08:58:26 - ddm-thread] Now ready: [Client pid: 585]
[2008-06-01 08:58:27 - ddms] Calling handler for TEST [com.android.ddmlib.HandleTest@15960fd] (len=8)
[2008-06-01 08:58:27 - ddm-test] handling TEST
[2008-06-01 08:58:27 - ddm-test] Received:
[2008-06-01 08:58:27 - ddm-test] 0000- 01 02 03 04 fc fd fe ff ........
[2008-06-01 08:58:27 - ddms] Read 118 bytes from [Client pid: 585]
[2008-06-01 08:58:27 - ddms] Checking 118 bytes
[2008-06-01 08:58:27 - ddms] Found 0x40000002 in request set - com.android.ddmlib.HandleHello@1fe0dcb
[2008-06-01 08:58:27 - ddms] Found 0x40000002 in request set - com.android.ddmlib.HandleHello@1fe0dcb
[2008-06-01 08:58:27 - ddms] Calling handler for HELO [com.android.ddmlib.HandleHello@1fe0dcb] (len=42)
[2008-06-01 08:58:27 - ddm-hello] handling HELO
[2008-06-01 08:58:27 - ddm-hello] HELO: v=1, pid=585, vm='Dalvik v0.2.0', app=''
[2008-06-01 08:58:27 - ddms] Removing req 0x40000002 from set
[2008-06-01 08:58:27 - ddms] Checking 57 bytes
[2008-06-01 08:58:27 - ddms] Calling handler for APNM [com.android.ddmlib.HandleAppName@101f8f4] (len=38)
[2008-06-01 08:58:27 - ddm-appname] handling APNM
[2008-06-01 08:58:27 - ddm-appname] APNM: app='<pre-initialized>'
[2008-06-01 08:58:29 - ddms] Created: [Debugger 8603-->589 inactive]
[2008-06-01 08:58:29 - ddms] Adding new client [Client pid: 589]
[2008-06-01 08:58:29 - ddms] Read 71 bytes from [Client pid: 589]
[2008-06-01 08:58:29 - ddms] Bad handshake from client
[2008-06-01 08:58:29 - DeviceMonitor] Adding [Client pid: 589] to list of client to reopen (-1).
[2008-06-01 08:58:29 - ddms] Closing [Client pid: 589]
[2008-06-01 08:58:29 - ddms] Closing [Client pid: 589]
[2008-06-01 08:58:35 - ddms] broadcast 3: [Client pid: 589]
[2008-06-01 08:58:35 - ddm-hello] Now disconnected: [Client pid: 589]
[2008-06-01 08:58:35 - ddms] broadcast 3: [Client pid: 589]
[2008-06-01 08:58:36 - ddm-hello] Now disconnected: [Client pid: 589]
[2008-06-01 08:58:36 - ddms] Read 69 bytes from [Client pid: 585]
[2008-06-01 08:58:36 - ddms] Checking 69 bytes
[2008-06-01 08:58:36 - ddms] Calling handler for APNM [com.android.ddmlib.HandleAppName@101f8f4] (len=50)
[2008-06-01 08:58:36 - ddm-appname] handling APNM
[2008-06-01 08:58:36 - ddm-appname] APNM: app='com.google.android.home'
[2008-06-01 08:58:36 - DeviceMonitor] Reopening [Client pid: 589]
[2008-06-01 08:58:37 - ddms] Created: [Debugger 8603-->589 inactive]
[2008-06-01 08:58:40 - ddms] Adding new client [Client pid: 589]
[2008-06-01 08:58:46 - ddms] execute: running am start -n com.android.hello/com.android.hello.HelloAndroid
[2008-06-01 08:58:46 - ddms] execute: running pm -p com.android.hello
[2008-06-01 08:59:13 - ddms] execute 'am start -n com.android.hello/com.android.hello.HelloAndroid' on 'emulator-tcp-5555' : EOF hit. Read: -1
[2008-06-01 08:59:13 - ddms] execute 'pm -p com.android.hello' on 'emulator-tcp-5555' : EOF hit. Read: -1
[2008-06-01 08:59:13 - ddms] execute: returning
[2008-06-01 08:59:13 - ddms] execute: returning
[2008-06-01 08:59:14 - DeviceMonitor] Error reading jdwp list: EOF
[2008-06-01 08:59:14 - ddms] Read 14 bytes from [Client pid: 589]
[2008-06-01 08:59:14 - ddms] Good handshake from client, sending HELO to 589
[2008-06-01 08:59:14 - ddm-hello] Sending HELO ID=0x40000003
[2008-06-01 08:59:14 - ddms] Adding req 0x40000003 to set
[2008-06-01 08:59:14 - ddms] Closing [Client pid: 554]
[2008-06-01 08:59:14 - ddms] broadcast 3: [Client pid: 554]
[2008-06-01 08:59:14 - ddm-hello] Now disconnected: [Client pid: 554]
[2008-06-01 08:59:14 - ddms] Closing [Client pid: 510]
[2008-06-01 08:59:14 - ddms] broadcast 3: [Client pid: 510]
[2008-06-01 08:59:14 - ddm-hello] Now disconnected: [Client pid: 510]
[2008-06-01 08:59:14 - ddms] Closing [Client pid: 585]
[2008-06-01 08:59:14 - ddms] broadcast 3: [Client pid: 585]
[2008-06-01 08:59:14 - ddm-hello] Now disconnected: [Client pid: 585]
[2008-06-01 08:59:14 - ddms] Closing [Client pid: 589]
[2008-06-01 08:59:14 - ddms] broadcast 3: [Client pid: 589]
[2008-06-01 08:59:14 - ddm-hello] Now disconnected: [Client pid: 589]
sai
Freshman
Freshman
 
Posts: 3
Joined: Sun Jun 01, 2008 4:34 am

Top

Postby sai » Sun Jun 01, 2008 6:38 am

Hi,

I tried to do clean and build again to see if it works, but now I am facing new errors with resources. Any help in this regard is appreciated.

Thanks,
Sai.


[2008-06-01 11:05:44 - HelloAndroid] Removing generated java classes.
[2008-06-01 11:05:45 - HelloAndroid] Refreshing resource folders.
[2008-06-01 11:05:45 - HelloAndroid] Starting full Pre Compiler.
[2008-06-01 11:05:45 - HelloAndroid] Preparing generated java files for update/creation.
[2008-06-01 11:05:46 - HelloAndroid] Found 4 resource files in F:\GPhone\workspace\HelloAndroid\res
[2008-06-01 11:05:46 - HelloAndroid] Including resources from package: F:\GPhone\android-sdk_m5-rc15_windows\android.jar
[2008-06-01 11:05:46 - HelloAndroid] (processed image F:\GPhone\workspace\HelloAndroid\res\drawable\icon.png: 100% size of source)
[2008-06-01 11:05:46 - HelloAndroid] (new resource id Thumbs from F:\GPhone\workspace\HelloAndroid\res\drawable\Thumbs.db)
[2008-06-01 11:05:46 - HelloAndroid] res\drawable\Thumbs.db: Invalid file name: must contain only [a-z0-9_-.]
[2008-06-01 11:05:46 - HelloAndroid] 'aapt' error. Pre Compiler Build aborted.
[2008-06-01 11:05:47 - HelloAndroid] Starting full Package build.
[2008-06-01 11:05:47 - HelloAndroid] Project contains error(s). Package Builder aborted.
sai
Freshman
Freshman
 
Posts: 3
Joined: Sun Jun 01, 2008 4:34 am

Postby xh19840213 » Thu Jun 12, 2008 3:38 am

hi plusminus,

can you speak chinese , 你讲解的真好!

thank you
xh19840213
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Jun 06, 2008 8:34 am

hi sai

Postby manju » Thu Jun 12, 2008 6:27 am

First you check out whether you installed your ADT or not...
If not,unzip that folder first and then give that path in envirnomental variables.....
manju
Junior Developer
Junior Developer
 
Posts: 18
Joined: Mon Jun 09, 2008 9:38 am
Location: banglore

Re: Hello Android - Your first Application

Postby Jubi » Thu Jun 19, 2008 2:54 am

:D

very nice !!

thanks for your information
Jubi
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Jun 19, 2008 2:36 am

Bundle icycle

Postby ronenfe » Tue Sep 09, 2008 5:22 pm

hi, i'm a novice, can you please explain to me what is the meaning of Bundle class? and the purpose of it's object as a parameter in the onCreate function and in the call for super.onCreate?
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.     public void onCreate(Bundle icicle) {
  2.  
  3.         super.onCreate(icicle);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

why do we need to call super.onCreate at all?
ronenfe
Freshman
Freshman
 
Posts: 4
Joined: Tue Sep 09, 2008 5:12 pm

Postby uzziah0 » Mon Sep 29, 2008 8:14 pm

I was browsing the site, and am slightly interested.
But, I'm wondering what you are testing your apps on?
Do you have an Android device, or are you just using the SDK emulator?

Thanks
uzziah0
Freshman
Freshman
 
Posts: 2
Joined: Mon Sep 29, 2008 8:09 pm

Postby ninor » Mon Sep 29, 2008 8:48 pm

For now, we all test our programs on the emulator.
The only ones that maybe have a device on their hands are, besides of Google's developers, some Android Developers CHallenge winners (they showed their apps on the G1 at the T-Mobile presentation).

The device will be available from 22nd October.

But the emulator works like a charm!
User avatar
ninor
Moderator
Moderator
 
Posts: 180
Joined: Thu Aug 14, 2008 6:30 pm
Location: Barcelona, Spain

Postby uzziah0 » Mon Sep 29, 2008 9:30 pm

Wow.
I develop for embedded devices, and never trust an emulator.

I will need to read more about this (how ti develop apps, and how the manufacturers create the OS on their device, thanks.
uzziah0
Freshman
Freshman
 
Posts: 2
Joined: Mon Sep 29, 2008 8:09 pm

Re: Bundle icycle

Postby Marchu » Tue Sep 30, 2008 1:43 am

ronenfe wrote:hi, i'm a novice, can you please explain to me what is the meaning of Bundle class? and the purpose of it's object as a parameter in the onCreate function and in the call for super.onCreate?
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.     public void onCreate(Bundle icicle) {
  2.         super.onCreate(icicle);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

why do we need to call super.onCreate at all?


The bundle class is class that lets you store variables and types (and more), what can be used after restart of the app. (or after a freeze)
You can put integers, longs, strings, arrays, etc in the bundle, along with the keys to identify them. When needed, these values can be obtained by using those keys.

Like this:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public Bundle saveVars() {
  2.         Bundle myVars = new Bundle();
  3.  
  4.         // syntax like: putInt(String key, int value)
  5.  
  6.         myVars.putIntArray("mAppleList", coordArrayListToArray(mAppleList));
  7.         myVars.putInteger("mDirection", Integer.valueOf(mDirection));
  8.         myVars.putInteger("mNextDirection", Integer.valueOf(mNextDirection));
  9.         myVars.putLong("mMoveDelay", Long.valueOf(mMoveDelay));
  10.         myVars.putLong("mScore", Long.valueOf(mScore));
  11.         myVars.putIntArray("mSnakeTrail", coordArrayListToArray(mSnakeTrail));
  12.  
  13.         return myVars;
  14.  }
  15.  
  16.  
Parsed in 0.036 seconds, using GeSHi 1.0.8.4



See it like a backpack what the app is using. :)

Cheers

edit:
After seeing the date of his post, i think he's now expert :D
But this is then for others who are curious about this class
Marchu
Junior Developer
Junior Developer
 
Posts: 22
Joined: Sat Sep 27, 2008 4:11 pm
Location: Netherlands

Top
PreviousNext

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 9 guests