p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Android 2 Application Development (http://p2p.wrox.com/forumdisplay.php?f=547)
-   -   Chapter# 2 - Page 23 what to key in the new Android Project (http://p2p.wrox.com/showthread.php?t=78622)

Ahmed75 March 20th, 2010 12:04 PM

Chapter# 2 - Page 23 what to key in the new Android Project
I don't know why, but the auther didn't give what we should key in the New Android Project (Chapter 2 page 23), it just say fill these fields.

I put in the Project name, Application Name, but I don't know what to put on the followings:

Package Name:
Create Activity:
Min SDK Version: <== maybe the least android vertion that we want our apps to support?

Any help will be appreciated, I tried to key anything, but it's not valid and I can't pass this very first form.

Reto March 20th, 2010 12:17 PM

Step 3 tries to explain what each of these fields requires:

Package Name: Is a Java package name to which your project will belong. The standard form for this is <domainsuffix>.<domain>.<projectname> -- for example com.paad.earthquake

Create Activity: Lets you specify the name of an Activity class to create within your project. This will have the default 'Hello World' UI to begin with. An example would be MyActivity

Min SDK Version: Lets you specify what version of the Android SDK you want to develop for. To use the latest platform version (2.1) specify 7. Android 1.5 is SDK Version 3.

Hope that helps!

Ahmed75 March 20th, 2010 12:25 PM

Unbelievable!!!, that was quick, within minutes I got your answer to my question. Thank you so much

I got all what you said, except the Package Name, this is my first time developing for Java. (I developed applications for VB .Net, VBA, .ASP, XHTML with CSS,). So where in my package of Java do I find <domainsuffix>.<domain>.<projectname>?

Reto March 20th, 2010 12:28 PM

You get to make it up! Java packages need to be unique (and Java's heritage is the Internet) so generally people would create package names based on their websites (they don't have to be though -- anything likely to be unique is fine).

For examples in the book I use com.paad.projectname -- for instance com.paad.earthquake or com.paad.todolist. Google uses com.google.android.apps.projectname. You can use whatever you want!

Most people like to use com.<mycompany>.<projectname> - that's what I recommend you do.

Ahmed75 March 20th, 2010 03:31 PM

Thank you so much man!

kdc415 August 28th, 2010 11:26 PM

This post got me farther along, but I followed the instructions and get the error:

project cannot be built until path errors are resolved

main.xml containing the UI part was not created either. Any help appreciated.


kdc415 August 28th, 2010 11:34 PM

Solved path error. I'll try to get the rest working while waiting for reply.

kdc415 August 29th, 2010 12:19 AM

Got the main.xml part worked out. But now the emulator has been trying to launch for 30 mins. It has the android graphic, not text. The console log might help. Sorry for all of this I haven't felt like a newb since before the terms was coined. I haven't used java in over 20 yrs.

Console Log:

[2010-08-28 22:50:33 - Hello World 3] ------------------------------
[2010-08-28 22:50:33 - Hello World 3] Android Launch!
[2010-08-28 22:50:33 - Hello World 3] adb is running normally.
[2010-08-28 22:50:33 - Hello World 3] Performing com.pssnow.helloworld.MyActivity activity launch
[2010-08-28 22:50:33 - Hello World 3] Automatic Target Mode: Preferred AVD 'test' is not available. Launching new emulator.
[2010-08-28 22:50:33 - Hello World 3] Launching a new emulator with Virtual Device 'test'
[2010-08-28 22:50:37 - Hello World 3] New emulator found: emulator-5554
[2010-08-28 22:50:37 - Hello World 3] Waiting for HOME ('android.process.acore') to be launched...

I have min version set to 7

All times are GMT -4. The time now is 01:12 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.