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 February 5th, 2012, 11:53 AM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default My first project

Code:
I downloaded and installed Eclipse properly and I created a new project the way that I was instructed in the book and when I try to do the first example in the book I get the following error code message:
[2012-02-05 08:44:42 - HelloAndroidWorld] Error in an XML file: aborting build.
I give up!  You need an absolute Android expert to come by your house sit behind you for 10 hours to show how to use this complicated piece of you know what application. Maybe you can tell what it is that I have done wrong, because I don't have the slightest clue!
 
Old February 5th, 2012, 08:53 PM
Authorized User
 
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
Smile

Hi vbboyd
Well it does take a little time to figure out which end is up, but keep at it and you will learn.
Your problem is, I think, that you have the 'main.xml' file highlighted when you click run. Look at the 'layout' folder. There should be one file in it 'main.xml'. If there is a file called 'main.xml.out', delete it. Then click on the package name, or the source file name (MainActivity.java or whatever you called the project name), with one of those highlighted. Click on the run button or F11. If there is a '.out' file in any of the folders your code will not run, delete them. Mostly you see this in 'layout' and the 'Manifest' file.
You will fine a whole host of new problems to solve. Look in the LogCat window to see any runtime error messages. Although sometimes you need to look in the console window.
Use the '#' (["code"]["/code"]) for code you want to show.
Keep at it
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.

Last edited by Cliff2310; February 5th, 2012 at 08:55 PM..
 
Old February 6th, 2012, 02:03 AM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default My First Project

Code:
The real problem is that when I try to enter in the xml code from page 18 of:
android:Text= "This is my first Android application!"/>

and on the line of xml code of:

Android:Text="This is a clickable button" />

It gives an error on these lines of code: with a little orange triangle on the side and says something like  you must use @string format instead. Or something like that.
 
Old February 6th, 2012, 02:06 AM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default

Quote:
Originally Posted by Cliff2310 View Post
Hi vbboyd
Well it does take a little time to figure out which end is up, but keep at it and you will learn.
Your problem is, I think, that you have the 'main.xml' file highlighted when you click run. Look at the 'layout' folder. There should be one file in it 'main.xml'. If there is a file called 'main.xml.out', delete it. Then click on the package name, or the source file name (MainActivity.java or whatever you called the project name), with one of those highlighted. Click on the run button or F11. If there is a '.out' file in any of the folders your code will not run, delete them. Mostly you see this in 'layout' and the 'Manifest' file.
You will fine a whole host of new problems to solve. Look in the LogCat window to see any runtime error messages. Although sometimes you need to look in the console window.
Use the '#' (["code"]["/code"]) for code you want to show.
Keep at it
Cliff
I am not supposed to the main.xml highlighted when I click run? Then what exactly am I supposed to have highlighted when I click run?
 
Old February 6th, 2012, 12:37 PM
Authorized User
 
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by Cliff2310
Well it does take a little time to figure out which end is up, but keep at it and you will learn.
Your problem is, I think, that you have the 'main.xml' file highlighted when you click run. Look at the 'layout' folder. There should be one file in it 'main.xml'. If there is a file called 'main.xml.out', delete it. Then click on the package name, or the source file name (MainActivity.java or whatever you called the project name), with one of those highlighted. Click on the run button or F11. If there is a '.out' file in any of the folders your code will not run, delete them. Mostly you see this in 'layout' and the 'Manifest' file.
You will fine a whole host of new problems to solve. Look in the LogCat window to see any runtime error messages. Although sometimes you need to look in the console window.
As for the "little orange triangle on the side and says something like you must use @string format instead". That is just a warning. You may ignore it. What it is trying to tell you is that, You should put all strings in @string. Why, because then if you want to add a language, all you have to do is add another @string file.
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
 
Old February 6th, 2012, 02:54 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default My First project

Quote:
Originally Posted by Cliff2310 View Post
Hi vbboyd
Well it does take a little time to figure out which end is up, but keep at it and you will learn.
Your problem is, I think, that you have the 'main.xml' file highlighted when you click run. Look at the 'layout' folder. There should be one file in it 'main.xml'. If there is a file called 'main.xml.out', delete it. Then click on the package name, or the source file name (MainActivity.java or whatever you called the project name), with one of those highlighted. Click on the run button or F11. If there is a '.out' file in any of the folders your code will not run, delete them. Mostly you see this in 'layout' and the 'Manifest' file.
You will fine a whole host of new problems to solve. Look in the LogCat window to see any runtime error messages. Although sometimes you need to look in the console window.
Use the '#' (["code"]["/code"]) for code you want to show.
Keep at it
Cliff
Okay again what file should I have selected before I run the code that is on page 18-19 of the book? Because I have the main.xml file selected when I click the run button. Could that be the source as to why I am having compile errors? I can't think of any other reason.
 
Old February 6th, 2012, 07:21 PM
Authorized User
 
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
Default

Click on the package name, or the source file name (MainActivity.java or whatever you called the project name), with one of those highlighted. Click on the run button or F11. If there is a '.out' file in any of the folders your code will not run, delete them. Mostly you see this in 'layout' and the 'Manifest' file.
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
 
Old February 9th, 2012, 08:59 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default

Quote:
Originally Posted by Cliff2310 View Post
Click on the package name, or the source file name (MainActivity.java or whatever you called the project name), with one of those highlighted. Click on the run button or F11. If there is a '.out' file in any of the folders your code will not run, delete them. Mostly you see this in 'layout' and the 'Manifest' file.
Cliff
So if I select the Main.xml file and then run the application will it give me the error code message that I have been getting of:
error code message:
[2012-02-05 08:44:42 - HelloAndroidWorld] Error in an XML file: aborting build.
Because as soon as I click on the Main.xml file and the run the app, I get a Main.Xml.out file that wasn't there before I ran the app.
 
Old February 10th, 2012, 07:49 PM
Authorized User
 
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by vbboyd View Post
So if I select the Main.xml file and then run the application will it give me the error code message that I have been getting of:
error code message:
[2012-02-05 08:44:42 - HelloAndroidWorld] Error in an XML file: aborting build.
Because as soon as I click on the Main.xml file and the run the app, I get a Main.Xml.out file that wasn't there before I ran the app.
Yes.

Click on the package name, or the source file name (MainActivity.java or whatever you called the project name), with one of those highlighted. Click on the run button or F11. If there is a '.out' file in any of the folders your code will not run, delete them. Mostly you see this in 'layout' and the 'Manifest' file.
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
 
Old February 14th, 2012, 01:07 AM
Registered User
 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you manage to get it to work? i had the very same problems as you, the yellow mark on the left of the code.... thought it was me so i set up both of the lines as an @string (fast learner!) but i didnt need to. To run it I selected the 'helloworld' project name in the far left box and F11 (debug mode).

I DID have to get the latest software, eclipse AND android SDK's as it wouldnt 'build' the code. I was getting fed up too. Esp as when i tried to 'update' the SDK it would say there was a newer version, but kept failing to install it.

You might have the same problems i had. If so, this might help.....

Goto your 'Andriod' folder where you installed the SDK in the frist place.
(prob in your 'programs' folder or 'program files (x86) - if 64bit)
Then goto 'android-sdk' folder and rename the 'tools' folder to 'old'
Now go into 'old' folder and double click 'Android.bat'
*** make sure you are connected to the internet when you do this ***
This should rebuild the 'tools' folder and fix the update problem.
(once its done you can delete the 'old' folder if you want to)

Then go though the books instructions from the start to make sure that the Android plugin is setup in eclipse correctly.

hope this makes sense and has helped.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 22: Introduction to Project Management... Project Program integration chrisa BOOK: Professional Application Lifecycle Management with Visual Studio 2010 1 September 15th, 2010 03:28 PM
Website project vs Web Application Project... thenoseknows ASP.NET 2.0 Professional 0 January 14th, 2007 09:47 PM
UserControl of One Project in Other Project gadhiav ASP.NET 1.0 and 1.1 Professional 2 February 18th, 2006 07:51 AM
Add report of one project into another project tejaswibv Crystal Reports 0 July 13th, 2005 04:40 AM





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