I am getting a runtime exception on the line in my code that sets the content view for the activity. This leads me to believe that my xml file must have an issue that I am simply not seeing. Any help at all would be greatly appreciated.
NOTE: The second TextView is set to blank because the activity associated with this view performs some calculations of which the result will be displayed in the second TextView.
<?xml version="1.0" encoding="utf-8"?>
<ReativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/background"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/results_label_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/results_label"
android:layout_centerHorizontal="true" />
<TextView
android:id="@+id/results_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
android:layout_centerInParent="true" />
</ReativeLayout>
Any ideas? I imagine I have something coded wrong here.
UPDATE: Here's the Stack
Thread [<1> main] (Suspended (exception RuntimeException))
ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2663
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2679
ActivityThread.access$2300(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 125
ActivityThread$H.handleMessage(Message) line: 2033
A开发者_如何学CctivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 868
ZygoteInit.main(String[]) line: 626
NativeStart.main(String[]) line: not available [native method]
I imagine you've solved this by now, but I had a similar problem with setContentView. After wasting hours checking syntax and spelling and surfing the web, all I had to do was clean the project and it worked perfectly.
精彩评论