Creating Project Issues :/


#1

Hi all

I’ve encountered a problem when I hit Chapter 7 (and everything was going so well before now).

As soon as I create the new project for CriminalIntent I’m instantly met with a whole load of errors in CrimeActivity.java. Even when I paste in the completed solution downloaded from the BNR homepage I still have errors. Am I setting this up wrong or has Eclipse and the Android SDK’s been updated since the release of the book that have done something to effect this project? Additionally, is there a fix for it? I’ve scoured Google and the forum for a solution but not come across one yet :confused:

(A video of my setup)
http://youtu.be/fjfvM5xuwH0


#2

It’s a little hard to see from your video, but two things stand out:

  1. You’re subclassing your Activity from ActionBarActivity. The example in Chp. 7 subsclasses from FragmentActivity.
  2. You’re importing the Support Library for ActionBarActivity. Should be importing the support.v4 library for Fragments.

#3

Hi rcubed

Sorry for the delay in reply I have been on vacation.

I think I have just fixed the problem, it seemed that the paths was not built correctly pointing towards appcompat_v7, so fixed it by right clicking both android-support-v4.jar and android support-v7-appcompat.jar in the project explorer, build path then clicked add to build path. So far all the errors are gone from the project.

Thanks for the help :slight_smile:

Bob