I'm developing on Windows with Eclipse (Ganymede) with SDK 1.0r2. For
a few days, I was able to run and debug my program on both the
emulator and my phone. Starting yesterday, I've been unable to launch
the activity of the program I'm developing on the emulator or phone.
(I can still run my hello world app.) My run and debug configurations
are
set to launch my activity com.android.bounce.Bounce. When I try
debugging, I get this error and stack dump:
Bounce config [Android Application]
DalvikVM[localhost:8608]
Thread [<3> main] (Suspended (exception
RuntimeException))
ActivityThread.performLaunchActivity
(ActivityThread$ActivityRecord)
line: 2140
ActivityThread.handleLaunchActivity
(ActivityThread$ActivityRecord)
line: 2156
ActivityThread.access$1800(ActivityThread,
ActivityThread
$ActivityRecord) line: 112
ActivityThread$H.handleMessage(Message) line:
1580
ActivityThread$H(Handler).dispatchMessage
(Message) line: 88
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3742
Method.invokeNative(Object, Object[], Class,
Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 515
ZygoteInit$MethodAndArgsCaller.run() line: 739
ZygoteInit.main(String[]) line: 497
NativeStart.main(String[]) line: not available
[native method]
Thread [<13> Binder Thread #2] (Running)
Thread [<11> Binder Thread #1] (Running)
I have tried restarting Eclipse and rebooting my computer, without
effect.
Here is the code for the activity class, which has been unchanged
since before I began getting this error:
public class Bounce extends Activity {
@SuppressWarnings("unused")
private BounceThread mBounceThread;
private BounceView mBounceView;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// get handles
mBounceView = (BounceView)findViewById(R.id.bounce);
mBounceThread = mBounceView.getThread();
}
}
Stepping through in the debugger, savedInstanceState == NULL, and the
failure occurs in setContentView(). The file res/layout/main.xml is:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<com.android.bounce.BounceView
android:id="@+id/bounce"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</FrameLayout>
The automatically created R.java file includes:
public final class R {
...
public static final class id {
public static final int bounce=0x7f050000;
}
...
}
Here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.bounce"
android:versionCode="1"
android:versionName="1.0.0">
<application android:debuggable="true" android:icon="@drawable/
icon" android:label="@string/app_name">
<activity android:name="Bounce"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I'd be grateful for any advice.
Ellen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---