.971 Java
ERROR 1: 02-01 20:08:49.915: W/ActivityManager(2704): Trying to launch nl.edb.tabellenapp/.SubItemListActivity 02-01 20:08:49.925: W/dalvikvm(16447): Method Lnl/edb/tabellenapp/SubItemList;.access$0 overrides final Lnl/edb/tabellenapp/CommonListFragment;.access$0 02-01 20:08:49.925: W/dalvikvm(16447): failed creating vtable 02-01 20:08:49.925: W/dalvikvm(16447): Link of class 'Lnl/edb/tabellenapp/SubItemList;' failed ERROR 2: 02-01 20:34:24.070: W/ActivityManager(2704): Trying to launch nl.edb.tabellenapp/.SubItemListActivity 02-01 20:34:24.080: W/dalvikvm(18487): Method Lnl/edb/tabellenapp/SubItemList;.access$0 overrides final Lnl/edb/tabellenapp/CommonListFragment;.access$0 02-01 20:34:24.080: W/dalvikvm(18487): failed creating vtable 02-01 20:34:24.080: W/dalvikvm(18487): Link of class 'Lnl/edb/tabellenapp/SubItemList;' failed 02-01 20:34:24.080: E/dalvikvm(18487): Could not find class 'nl.edb.tabellenapp.SubItemList', referenced from method nl.edb.tabellenapp.SubItemListActivity.onCreate 02-01 20:34:24.080: W/dalvikvm(18487): VFY: unable to resolve new-instance 477 (Lnl/edb/tabellenapp/SubItemList;) in Lnl/edb/tabellenapp/SubItemListActivity; 02-01 20:34:24.080: D/dalvikvm(18487): VFY: replacing opcode 0x22 at 0x000e 02-01 20:34:24.085: D/dalvikvm(18487): VFY: dead code 0x0010-002f in Lnl/edb/tabellenapp/SubItemListActivity;.onCreate (Landroid/os/Bundle;)V 02-01 20:34:24.090: D/AndroidRuntime(18487): Shutting down VM 02-01 20:34:24.090: W/dalvikvm(18487): threadid=1: thread exiting with uncaught exception (group=0x4001e578) 02-01 20:34:24.095: E/AndroidRuntime(18487): FATAL EXCEPTION: main 02-01 20:34:24.095: E/AndroidRuntime(18487): java.lang.NoClassDefFoundError: nl.edb.tabellenapp.SubItemList 02-01 20:34:24.095: E/AndroidRuntime(18487): at nl.edb.tabellenapp.SubItemListActivity.onCreate(Z:\Mercurial\Mobile\nl.edb.tabellenapp\nl.edb.tabellenapp\SubItemListActivity.pas:33) 02-01 20:34:24.095: E/AndroidRuntime(18487): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
CommonListFragment = public class (android.support.v4.app.ListFragment ) public method onStart; override; end; type SubItemList = public class(CommonListFragment) // no onStart defined in this class method CommonListFragment.onStart; begin inherited; // we gaan de kop automatisch koppelen var btn := Button(view:findViewById(r.id.topbtn_datafiscaal)); btn:OnClickListener := method begin var x := Activity; //.startActivity(new Intent(Activity, TypeOf(MainActivity))); /////////// Above line is commented out partially. Using Activity triggers the error. Might there some mixup /////////// because Activity is both a property of a fragment, and a classname? end; end;
Notice: ‘dead code’
I’ll try some more to check where the problem is.
UPDATE:
If I move the anonymous method into a separate named method all works fine.