![]() | 3.5 -- Still having the crash!! |
|
26 May 2009, 06:49
Alex (1 post) |
Ok, so by the end of section 3.5 I was supposed to have something like on fig. 3.8, after adding additional to the AndroidManifest.xml, but I’m still getting the crush like it’s on fig. 3.7!
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, Sudoku!</string>
<string name="app_name">Sukokuist</string>
<string name = "main_title">Android SudokkkU</string>
<string name = "continue_label">Continue</string>
<string name = "new_game_label">New Game!</string>
<string name = "about_label">About</string>
<string name = "exit_label">Exit</string>
<string name = "about_text">
Microsoft's old search engine, Windows Live Search, has been unable to gain ground against Google, despite innovative schemes like paying businesses and consumers to use its search engine with programs like "Microsoft Service Credits for Web Search", "SearchPerks!", and Live Search cash back.
In November 2007, Microsoft's share of U.S. searches stood at 9.8%, according to ComScore. At the end of April 2009, its share had dropped to 8.2%.
Microsoft's new search engine, whether it's named Kumo or something that sounds less like a vegan sandwich spread, aims to reverse that trend. The company remains coy about whether the Kumo brand will be kept.
"As for rebranding, it's something we're still considering," Live Search general manager Mike Nichols said in a blog post in March.
</string>
</resources>
|
|
26 May 2009, 14:02
Ed Burnette (1316 posts) |
I pasted in all the code and XML from your posting into my own project and didn’t get a crash. Is it possible there was an error that prevented your new version from getting installed on the phone? Check both Eclipse and the DDMS log (adb logcat) for errors, and force an uninstall by doing “adb uninstall org.example.sudoku” before running again. If that doesn’t help, then I suggest downloading the source code zip file from http://www.pragprog.com/titles/eband/source_code and comparing your version against the Sudokuv1 project. Let us know how it goes. |
|
31 May 2009, 04:39
Bob Weber (1 post) |
FWIW, |
|
31 May 2009, 19:59
Ed Burnette (1316 posts) |
I’m looking into it. Please send me a zip file with your project plus a copy of your log and all error messages. Also let me know what version of the SDK, Eclipse, Java, and Android firmware you have. Thanks. |
|
27 Jun 2009, 14:16
Peter Kirn (4 posts) |
I got stuck on this for a couple of hours, scratching my head—and now I know the problem. ;) Check your LogCat. You get: I think the problem is that Settings is defined as android.provide.Settings – if you create a new class and call it Settings.java and refer to ”.Settings” in androidmanifest.xml, it seems the app may try to look for android.provider.Settings within your existing package path. I just changed my name to something else ([YourActivityName]Settings) in the class file and the manifest – bingo, no more crash. I think you can also drop the dot. Ed, any idea why you didn’t have this problem? This is SDK 1.5 / Eclipse 3.4 / Java 6. Firmware doesn’t matter – you can do it in the emulator. |
|
01 Jul 2009, 22:10
Ed Burnette (1316 posts) |
According to http://developer.android.com/guide/topics/manif… , “android:name The name of the class that implements the activity, a subclass of Activity. The attribute value should be a fully qualified class name (such as, “com.example.project.ExtracurricularActivity”). However, as a shorthand, if the first character of the name is a period (for example, ”.ExtracurricularActivity”), it is appended to the package name specified in the element. “ It’s possible you’ve found a bug, in which case you should report it at http://code.google.com/p/android/issues/list . Meanwhile, try using a fully qualified name like ‘’ to see if that helps and lets you use your old class name. |
|
22 Jul 2009, 22:57
Dubed (2 posts) |
Hello all, It makes a bit of hour that I have the same error and i don’t understand how to do to makes it work. I’ve got the problem on the About activity. Same as above, it works on landscape but not in the other way. Doesn’t work too. logCat
07-22 20:58:49.930: ERROR/AndroidRuntime(1446): Uncaught handler: thread main exiting due to uncaught exception
07-22 20:58:49.944: ERROR/AndroidRuntime(1446): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.example.sudoku/org.example.sudoku.Sudoku}: java.lang.NullPointerException
07-22 20:47:13.330: ERROR/AndroidRuntime(1428): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
07-22 20:47:13.330: ERROR/AndroidRuntime(1428): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
07-22 20:47:13.330: ERROR/AndroidRuntime(1428): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
What can I do : (sorry for my english : I’am french) EDIT I can go sleeping now ^^ |
|
25 Jul 2009, 01:37
Ed Burnette (1316 posts) |
That’s weird. I’m glad it’s working now for you but I would like to have known why. |
|
18 Sep 2010, 13:25
jay kyung (1 post) |
I just got the book yesterday and having the same issue (I declared the activity for ‘About’ but still getting the application error). It works on landscape but not the portrait mode. I have Eclipse 3.6 and java 1.6.0_21-b07 with Android SKD 2.2. I have read this discussion but not sure what is the solution or workaround for the issue. when captured the log file (below and there is no errors by the way), it shows exactly same log for both portrait and landscape mode. logcat: [2010-09-18 06:10:10 – Sudoku] when I restart the emulator with sudoku app: 09-18 13:18:01.392: ERROR/AndroidRuntime(300): FATAL EXCEPTION: main |
|
16 Nov 2010, 13:35
Ed Burnette (1316 posts) |
[Sorry it took so long to respond. I don’t check the forums for the older editions very often and the forums software doesn’t notify me when new posts are added. The 3rd edition forum is at http://forums.pragprog.com/forums/152 . You can post questions on any edition there, just include the edition number.] I’ve seen this happen before when people forget to add the android:id tags to both the portrait and landscape versions of their layout file. Check for that and check for the exact spelling and capitalization. |
| You must be logged in to comment |

