Skip to content Skip to sidebar Skip to footer

Android Program Hangs Before Oncreate Is Called (beginner)

I needed some sample code to test out the AudioRecord class and I came across this website LINK TO THE SOURCE CODE However the program doesn't run, and hangs after a while. When th

Solution 1:

Don't know if its the exact cause but in the XML layout file it makes references to @+id/textView1 but there is no TextView defined in the XML file. This may refer to the TextView that the SDK creates by default to show the "Hello World" label but has been removed from the example given.
In fact looking at the code in the layout more, the line android:layout_alignLeft="@+id/textView1" is wrong because it has @+id/ which means it is trying to assign a new id/ to android:layout_alignLeft instead of making it match the value "@id/textView1".


Post a Comment for "Android Program Hangs Before Oncreate Is Called (beginner)"