Wrox Programmer Forums
|
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 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 August 28th, 2010, 10:06 PM
Registered User
 
Join Date: Jun 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do you import these projects into Eclipse?

When I try to import the projects I get the dreaded "Unable to get system library for the project" in my Java Build Path Libraries tab.

What I did was use Eclipse to import the project. All the code is there. The gen folder is missing too...not sure how to create it (why wasn't this included in the download?).

How exactly do you go about importing these projects into Eclipse and create the gen directory with the R file in it?

Thanks!

Last edited by darrinps; August 28th, 2010 at 10:18 PM..
 
Old August 28th, 2010, 10:38 PM
Registered User
 
Join Date: Jun 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I figured it out.

DON'T try to import the thing.

Create a new Android project and use the existing source.
 
Old June 13th, 2011, 11:20 AM
Registered User
 
Join Date: Jun 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to solo
Default

Great tip!
 
Old September 9th, 2011, 02:21 AM
Registered User
 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, when you say copy over the source to the new project do you mean everything - AndroidManifest, default.properties or just or just files in src and res directories. Thanks
 
Old October 12th, 2011, 10:23 AM
Registered User
 
Join Date: Oct 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to import book projects into Eclipse?

Quote:
Originally Posted by floatupcp View Post
Hi, when you say copy over the source to the new project do you mean everything - AndroidManifest, default.properties or just or just files in src and res directories. Thanks
I have basically the same question. I have tried several approaches and the code transfers over but when I try to run it I get errors. For example:

Code:
Unable to read C:\android\android-sdk-windows\samples\android-10\AndroidManifest.xml: java.io.FileNotFoundException: C:\android\android-sdk-windows\samples\android-10\AndroidManifest.xml (The system cannot find the file specified)

com.android.io.StreamException: java.io.FileNotFoundException: C:\android\android-sdk-windows\samples\android-10\AndroidManifest.xml (The system cannot find the file specified)
...and many more (75 to be exact) any suggestions as to what I might be doing wrong?
 
Old November 5th, 2011, 01:10 PM
Authorized User
 
Join Date: Nov 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm very new to this too, but I can import the downloaded projects using the method File - Import - Existing Projects Into Workspace

...but you have to check the box labeled "Copy Projects Into Workspace"

Looking at my files I have all the folders for the chapters sitting next to another folder called 'workspace' which I think Eclipse created as a default. When you import the projects they are copied into the workspace folder.

This method got rid of all the strange errors I had when trying to set it up the way the book said
 
Old March 6th, 2012, 10:04 PM
Registered User
 
Join Date: Mar 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Another thing to make Eclipse go

After Importing the code example project into Eclipse I also got errors.

Another thing that I had to do in eclipse was set the "Project->Properties->Android" and select "Target Name = Android 2.1".

After doing that everything seemed to go.





Similar Threads
Thread Thread Starter Forum Replies Last Post
eclipse Uniqe Beginning PHP 1 February 4th, 2012 03:29 PM
Browsed web projects don't appear in recent projects list? Ron Howerton Visual Studio 2008 0 June 23rd, 2010 12:52 PM
Text Import- How to import the first 5 lines. nickzhang.zn Excel VBA 1 August 4th, 2007 05:06 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.