Wrox Programmer Forums
|
BOOK: Professional Android 4 Application Development
This is the forum to discuss the Wrox book Professional Android 4 Application Development Reto Meier; ISBN: 978-1-1181-0227-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 4 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 April 11th, 2013, 10:35 PM
Authorized User
 
Join Date: Feb 2013
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Default To Do List Example Problem

I created the example with the suggested Build Target 4.0.3 API Level 15, and with Minimum SDK 4(Android 1.6).

I see errors on NewItemFragment.java - When I hover over the error it shows "Call Requires API Level 11 (Current Min is 4)"

Another error also with NewItemFragment.java - myEditText cannot be resolved.

ToDoItemAdapter - rowDate and row showing as error - cannot be resolved.

I have more errors that are showing. I created the project just like it shows on the book, and then I opened the code examples, and copied over just to make sure I didn't miss anything, but still showing all these errros.

Thanks for the help in advance.
 
Old April 13th, 2013, 03:32 PM
Authorized User
 
Join Date: Jan 2013
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi,
i also don't understand how it ever could work at min sdk version 4.
That should be 11.
 
Old April 15th, 2013, 08:25 AM
Authorized User
 
Join Date: Feb 2013
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Default Hi Kees

I will try with min 11
Thanks
 
Old April 16th, 2013, 07:03 AM
Authorized User
 
Join Date: Feb 2013
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Default Still seeing some errors

Hi,

I recreated the project with min11. I dragged files under the src, res, folder, and copied the code of the rest so that all the project files are there, but I'm still seeing errors in the following files. Is there a possible problem because I imported the files (dragged them from the Full Worked Sample Project folder)?

Errors I'm seeing in Red

----NewItemFragment Errors

View view = inflater.inflate(R.layout.new_item_fragment, container, false);

(EditText)view.findViewById(R.id.myEditText);


----ToDoItemAdapter Errors

TextView dateView = (TextView)todoView.findViewById(R.id.rowDate);
TextView taskView = (TextView)todoView.findViewById(R.id.row);


----ToDoListActivity Errors

int resID = R.layout.todolist_item;


----ToDoListItemView Errors

marginPaint.setColor(myResources.getColor(R.color.notepad_margin));

linePaint.setColor(myResources.getColor(R.color.notepad_lines));

paperColor = myResources.getColor(R.color.notepad_paper);
margin = myResources.getDimension(R.dimen.notepad_margin);


Thanks for the help
 
Old April 16th, 2013, 03:37 PM
Authorized User
 
Join Date: Jan 2013
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Default Hi marfl99

I assume that it is about the todo list in chapter 4, and that you are using eclipse (as i do).
It seems that your gen/R.java has been corrupted.
Sometimes only changing the min sdk value in the manifest does not solve all problems..
Important is to check the properties for the project, at least the android project build target, that should be android 3.0 (api level 11).
If that is ok, go back to the project home screen. File/Refresh the whole project
If the errors are still there, rebuild the project with the "clean" submenu in the "project" pull down menu. That will also rebuild the R file.
If that does not help, try android tools menu (right mouse click on the project name in the package explorer, then run Lint, and see what is still not ok.
Hope this helps!





Similar Threads
Thread Thread Starter Forum Replies Last Post
To Do List Activity Problem marfl99 BOOK: Professional Android 4 Application Development 2 February 28th, 2013 08:12 AM
Category List Problem ColinM BOOK: Joomla! Start to Finish: How to Plan, Execute, and Maintain Your Web Site 3 September 22nd, 2010 12:57 PM
cascading list problem Vince_421 Access VBA 5 January 30th, 2007 11:41 AM
List Box Problem informaniac ASP.NET 2.0 Basics 2 August 30th, 2006 05:37 AM
Problem with Drop down list praveen_haridas ASP.NET 1.0 and 1.1 Basics 3 January 26th, 2006 05:55 AM





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