I am pulling data from a database, returning the values in an instance of a class. In my onCreate method of my Activity, I am setting the content view and then running the following code:
val thisObject:ClassCardJ = myDBAdapter.getAddressBookEntry(cardNum)
//val textFullName:String = (thisObject.getfName().toString() + " " + thisObject.getlName().toString())
val textFirstName:String = thisObject.getfName().toString()
val textLastName:String = thisObject.getlName().toString()
firstLine.setText(textFirstName)
Toast.makeText(AddressBookEntryActivity.this, thisObject.getlName().toString(), Toast.LENGTH_SHORT).show();
Which sets the firstLine text to the textFirstName value and displays a toast with the value that I am using in textLastName.
However, when I attempt to change the setText of the firstLine to textFullName (after uncommenting it), my program force closes. Am I doing something funny wrong??
As request, my logcat stack trace (I tried to include everything relevant and omit everything non-relevant):
I/ActivityManager( 67): Process com.android.email (pid 330) has died.
I/ActivityManager( 67): Starting: Intent { cmp=me.snapcard/.AddressBookActivity } from pid 393
I/ActivityManager( 67): Displayed me.snapcard/.AddressBookActivity: +589ms
I/ActivityManager( 67): Starting: Intent { cmp=me.snapcard/.AddressBookEntryActivity (has extras) } from pid 393
E/dalvikvm( 393): Could not find class 'scala.collection.mutable.StringBuilder', referenced from method me.snapcard.AddressBookEntryActivity.onCreate
W/dalvikvm( 393): VFY: unable to resolve new-instance 1148 (Lscala/collection/mutable/StringBuilder;) in Lme/snapcard/AddressBookEntryActivity;
D/dalvikvm( 393): VFY: replacing opcode 0x22 at 0x0050
D/dalvikvm( 393): VFY: dead code 0x0052-0091 in Lme/snapcard/AddressBookEntryActivity;.onCreate (Landroid/os/Bundle;)V
D/AndroidRuntime( 393): Shutting down VM
W/dalvikvm( 393): threadid=1: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 393): FATAL EXCEPTION: main
E/AndroidRuntime( 393): java.lang.NoClassDefFoundError: scala.collection.mutable.StringBuilder
E/AndroidRuntime( 393): at me.snapcard.AddressBookEntryActivity.onCreate(AddressBookEntryActivity.scala:40)
E/AndroidRuntime( 393): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 393): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
E/AndroidRuntime( 393): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
E/AndroidRuntime( 393): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 393): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime( 393): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 393): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 393): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 393): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 393): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 393): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 393): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 393): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 67): Force finishing activity me.snapcard/.AddressBookEntryActivity
W/ActivityManager( 67): Force finishing activity me.snapcard/.AddressBookActivity
W/ActivityManager( 67): Activity pause timeout for HistoryRecord{4082ce18 me.snapcard/.AddressBookEntryActivity}
I/dalvikvm( 67): Jit: resizing JitTable from 1024 to 2048
W/ActivityManager( 67): Launch timeout has expired, giving up wake lock!