Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 May 20th, 2013, 09:14 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 Problems Running Earthquake 1

The book does not specify the min required SDK, the target SDK, or the compile with.

I added all the code with min: API 8, Target: API 17.

I'm getting the following errors on EarthquakeListFragment - Errors in FONT RED

1. public class EarthquakeListFragment extends ListFragment {


2. super.onActivityCreated(savedInstanceState);

3. aa = new ArrayAdapter<Quake>(getActivity(), layoutID , earthquakes);

4. setListAdapter(aa);

5. String quakeFeed = getString(R.string.quake_feed);


PS. Number 5. quake_feed. The Strings.xml have the <string name="quake_feed">

Thanks for your help.
__________________
Marcelo Oliveira
MAOWebSolutions.com
Reply With Quote
  #2 (permalink)  
Old May 21st, 2013, 04:34 AM
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 Problems Running Earthquake 1

Hi marfl99,

In eclipse when editing EarthquakeListFragment, try "ctrl-shift-o" and import android.app.ListFragment. If i omit this, i see the errors you noticed..
But this only works on min sdk = 11, for the majority of the examples in the book try 11, not less. Otherwise include a support library.

Hope it helps!
Reply With Quote
  #3 (permalink)  
Old May 24th, 2013, 08:30 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 Hey Kees, that did help but not completely

Hey Kees,

That fixed almost everything. Threre is only one thing left. The line below in RED

String quakeFeed = getString(R.string.quake_feed);

And as you can see I have the quake_feed in the strings file.

<string name="quake_feed">
http://earthquake.usgs.gov/eqcenter/.../1day-M2.5.xml
</string>


Thanks so much for your help.
__________________
Marcelo Oliveira
MAOWebSolutions.com
Reply With Quote
  #4 (permalink)  
Old June 21st, 2013, 12:14 PM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2013
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The Quake feed URL in the example string resource has been depreciated by the USGS.gov folks. So it does not work. You can rework using the new feeds URL (see their web site), which if you want you app to work you will have to do.

But for testing, use http://earthquake.usgs.gov/earthquak...y/2.5_day.atom

as the url string.
Reply With Quote
  #5 (permalink)  
Old June 22nd, 2013, 09:56 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

Will do! thanks
__________________
Marcelo Oliveira
MAOWebSolutions.com
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
Chapter 7 Earthquake 2, Earthquake.java, error onActivityResult dbomberg BOOK: Professional Android 2 Application Development 2 November 30th, 2012 05:52 AM
Problem Running Chapter 6 Earthquake clombardo BOOK: Professional Android 2 Application Development 26 June 28th, 2012 01:33 PM
Chapter 9: Problems running published forms blade117runner BOOK: Professional SharePoint 2010 Development 0 July 25th, 2010 01:59 AM
Chapter 3 - p.71 - Building and running problems LuckyLuc BOOK: Beginning Mac OS X Programming 1 June 24th, 2010 05:36 AM
Problems installing and running IIS Ads Dreamweaver (all versions) 5 January 4th, 2006 11:04 AM



All times are GMT -4. The time now is 12:32 AM.


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