Wrox Programmer Forums
|
BOOK: Beginning Android Application Development
This is the forum to discuss the Wrox book Beginning Android Application Development by Wei-Meng Lee; ISBN: 978-1-1180-1711-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 20th, 2011, 08:01 PM
Authorized User
 
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
Default Eclipse questions

Hi All
Can anyone point me to some good Eclipse Tutorials? I have look at and read some from the Eclipse Resources page (http://www.eclipse.org/resources/). They are good but not at general newbie questions.
Like:
1. Package exploder: I can delete a package from the list, but I can not find a way to open one?
2. Perspectives: When and why is it best to use over another?
3. How best to add a source path? I have tried with add new path(jdk1.7), when in debug, but it seems to forget it when I go to new project. This still leaves most with no code. What other code should I download(?) and or add?
Well this will do for now.
Thanks advance for your help
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
 
Old November 22nd, 2011, 01:59 AM
Registered User
 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Eclipse Answers

Hey Cliff,

1. If by open a "package" within the package explorer, you want to import an existing one simply right click inside the package explorer and select import then choose an existing project.

2. I use the java perspective when I am coding and the DDMS/Debug perspective when I am testing my apps.

3. I am not quite sure what you mean by this one so I'll leave it for some one else or maybe you can clarify.

Hope this helps.
 
Old November 22nd, 2011, 08:22 PM
Authorized User
 
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
Default

Hi BLTuck
Quote:
Originally Posted by BLTuck View Post
Hey Cliff,

1. If by open a "package" within the package explorer, you want to import an existing one simply right click inside the package explorer and select import then choose an existing project.
I tried that, but all I get is a list of things that do not include my workspace.

2. I use the java perspective when I am coding and the DDMS/Debug perspective when I am testing my apps.
OK, thanks.

3. I am not quite sure what you mean by this one so I'll leave it for some one else or maybe you can clarify.

Hope this helps.
Thanks for your reply
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
 
Old December 14th, 2011, 09:06 PM
Authorized User
 
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
Default Some answers

Hi all
See appendix A & B. These answered a lot of my questions. Sometimes you need to look at the end of the book first.
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
 
Old February 4th, 2012, 12:14 PM
Registered User
 
Join Date: Feb 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by BLTuck View Post
1. If by open a "package" within the package explorer, you want to import an existing one simply right click inside the package explorer and select import then choose an existing project.
I have a follow-up question on this.
When I import (choosing "Existing project into workspace") any project for the book, I get the error message dialog "Android-9 not resolved" and then the java files don't find any imports, like import android.app.activity "cannot be resolved".

Maybe I need to tell Eclipse to import the project as an Android project, but if so, how do I do that?

If I create a project from scratch and copy the code there, then it works nice. But how do i take control over file management in Eclipse, so that it can find at least the system library?

Last edited by Typo; February 4th, 2012 at 01:11 PM..
 
Old February 4th, 2012, 01:14 PM
Authorized User
 
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
Default

Hi Typo
Well i just looked and AIP 9 does not seem available for download through the API manger. It might be possible to get it but I don't recommend it. I have not tried this my self, so take it with a grain of salt.
After you import the package. Highlight the package name and right click. this will bring up a pop up menu. At the bottom of the menu should be 'proprieties' , open it. Click the 'Android' on the left. This will show the 'Project Build Target'
Pick one that you have (API10). Note ther may be more that one API10. Pick the one named 'Android 2.3.3' unless you need Goggle APS or something else.
You may need to edit the Manifest file to match.
Code:
     <uses-sdk android:minSdkVersion="10" />
Let me know if this all works.
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
 
Old February 4th, 2012, 01:46 PM
Registered User
 
Join Date: Feb 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for quick answer! However, it didn't work out. Nothing happens when I choose project build target 2.3.3. under Properties/Android. Even f I mark it and apply and OK, then next time I open properties it's unmarked.

I have an unrelated project which works fine, and it has a folder named Android 2.3.3 with a path to an android.jar file on my HDD under android-sdks/platforms. I've now copied this to Eclipse project explorer, but without helping solve my problem. And under properties/Java Build Path and the tab Libraries, I've added the same android.jar file as External Jar. Still withou success. I cannot choose any Project Build Target under Properties/Android for the project imported from wrox.

Obviously everything is in place. Just stoopid Eclipse doesn't care about it,

Could I type in a complete file search path in the import statement? It would seem much simpler than sifting through the thousands of dialogs and buttons and tabs and menues and concepts and terms and whatnot in the mysterious djungel which is Eclipse. I'd like to get an opportunity to start to do some programming sometime, not only managing file paths in Eclipse all the time...

Last edited by Typo; February 4th, 2012 at 01:51 PM..
 
Old February 4th, 2012, 02:03 PM
Registered User
 
Join Date: Feb 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Btw, where does that Android-9 requirement come from? Could I change something in the project files BEFORE I import them, to change it to Android-10 before Eclipse gets involved with it?
 
Old February 4th, 2012, 02:11 PM
Authorized User
 
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
Default

Hi Typo
OK, you made me look. What project are you trying to import?
Did you edit the Manifest file? Do that first the change the properties.

I just imported the LBS project from the book down load. It needs the Goggle API, so I had to change the project API twice. Then it complained about the compiler being the wrong level. Actually we (I) am one better than the book requires(1.7), but Eclipse does not like it. Again go the the project proprieties and select the Java compiler option. Check on the 'Enable...' box at the top and under the 'JDK Compliance' select 1.6. Click OK. It should work now.
Cliff
PS For the record Java 5 = 1.5, 6=1.6, and 7=1.7, etc. It confused me, until someone told me.
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.

Last edited by Cliff2310; February 4th, 2012 at 02:16 PM..
 
Old February 4th, 2012, 02:24 PM
Registered User
 
Join Date: Feb 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Notification in chapter 2. It's not important in itself, just happens to be the first I try to import. Tried with other projects from same chapter with the same problem.

My Java Compliance was already 1.6. But, acting randomly and hoping for luck, I changed it to 1.5 (project specific). It says it will rebuild the project, but it doesn't seem to react when I click Apply. Just like when I try to select Project Build Target.





Similar Threads
Thread Thread Starter Forum Replies Last Post
eclipse Uniqe Beginning PHP 1 February 4th, 2012 03:29 PM
Easy Eclipse jtbjustin BOOK: Professional Joomla! ISBN: 978-0-470-13394-1 1 November 17th, 2008 05:31 PM
Eclipse and PIX sin BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 3 January 22nd, 2008 07:50 PM
How to do workflow in Eclipse alokgupta14 Java Basics 0 December 14th, 2006 03:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.