20 Feb 2011, 07:51
Generic-user-small

John Blackwell (12 posts)

I’ve got the 3rd edition book. I can get through 3.4, but for the third time now I can’t get the “About” box procedure to work. First, whenever I imported files in, I always got some sort of error associated with “R”. But, if I typed them in by hand or copied them to notepad and then pasted, then most of the time they worked.

But, I got to page 48 without errors until I had to edit the AndroidManifest.xml file. I put in the extra

Ugh.

<?xml version=”1.0” encoding=”utf-8”?>
<manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”org.example.sudoku” android:versionCode=”1” android:versionName=”1.0”>

<activity android:name=”.Sudoku” android:label=”@string/app_name”> </activity android:name=”.About” android:label=@string/about_title”>
21 Feb 2011, 10:07
Generic-user-small

Marcus Näslund (13 posts)

You don’t need

</activity android:name=”.About” android:label=@string/about_title”>

in fact, it’s enough with

</activity>

I am not even sure if the former even works, try erasing it.

21 Feb 2011, 16:32
Generic-user-small

John Blackwell (12 posts)

I deleted the line as you suggested, and I still have a bunch of errors on my lines that have “R” in them in Sudoku.java and About.java.

21 Feb 2011, 18:32
Generic-user-small

Austin Warren (13 posts)

Change your android manifest file to look like this.


<activity android:name=”.Sudoku” android:label=”@string/app_name”></activity>
<activity android:name=”.About” android:label=@string/about_title”></activity>

Once you’ve done that. Click project—> Clean

then click project—> Build

this should fix any errors.

Cheers,

Austin

21 Feb 2011, 19:30
Burnette_ed_pragsmall

Ed Burnette (1316 posts)

Changing the manifest file won’t effect errors in your Java files. Delete any “import android.R;” lines that Eclipse put in there by mistake. Also do a Project > Clean command.

  You must be logged in to comment