Sources generate RuntimeException


#1

Hi,

I’ve found this chapter extremely challenging. And I’m quite distressed to find that it generates a runtime exception on my android devices.
This and all the subsequential chapters that contain the photogallery :-/

Where do we start to find the problem? I have tried running it on A Galaxy Tab 7 with android 4.1.1 and Samsung galaxy S3 with 4.1.2
I have also tried compiling with build target of 3.2, 4.0.3, 4.1.2 and I always get the same results.

Thread [<1> main] (Suspended (exception RuntimeException))

ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2021
ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2122
ActivityThread.access$600(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 140
ActivityThread$H.handleMessage(Message) line: 1228
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 137
ActivityThread.main(String[]) line: 4895
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object…) line: 511
ZygoteInit$MethodAndArgsCaller.run() line: 994
ZygoteInit.main(String[]) line: 761
NativeStart.main(String[]) line: not available [native method]


#2

I have found the solution by myself. It was due to a problem with the latest update to ADT 22.x

Right click the project, and choose Properties
Go to Java Build Path-Order and Export.
Tick ‘Android Private Libraries’
(Optional) Clean all projects if necessary

But I’m still frustrated because I don’t know the reasons behind this


#3

Everyone ran into this issue. The latest ADT changed how the build process works, and in the process broke our solutions.

Try downloading the solutions again. They should be fixed in the latest posted zip file.