Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 11th, 2013, 10:35 PM
Authorized User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old April 13th, 2013, 03:32 PM
Authorized User
Points: 89, Level: 1
Points: 89, Level: 1 Points: 89, Level: 1 Points: 89, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #3 (permalink)  
Old April 15th, 2013, 08:25 AM
Authorized User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2013
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Default Hi Kees

I will try with min 11
Thanks
Reply With Quote
  #4 (permalink)  
Old April 16th, 2013, 07:03 AM
Authorized User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #5 (permalink)  
Old April 16th, 2013, 03:37 PM
Authorized User
Points: 89, Level: 1
Points: 89, Level: 1 Points: 89, Level: 1 Points: 89, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:24 PM.


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