this is the most bizarre error I have ever seen, after I had error with database leaked I solve it by using static instance, now my activity crash but not every time only when I use it more than once and use another activity then back to it it will crash with the logcat below
02-22 22:42:40.332 2906-2916/? W/dalvikvm﹕ VFY: unable to find class referenced in signature (Landroid/sec/multiwindow/MultiWindow;)
02-22 22:42:40.332 2906-2916/? I/dalvikvm﹕ Could not find method android.sec.multiwindow.MultiWindow.getRect, referenced from method com.sec.android.app.clockpackage.alarm.MultiWindowActivity.setScreen
02-22 22:42:40.332 2906-2916/? W/dalvikvm﹕ VFY: unable to resolve virtual method 580: Landroid/sec/multiwindow/MultiWindow;.getRect ()Landroid/graphics/Rect;
02-22 22:42:40.332 2906-2916/? D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0018
02-22 22:42:40.332 2906-2916/? I/dalvikvm﹕ Could not find method android.sec.multiwindow.MultiWindow.createInstance, referenced from method com.sec.android.app.clockpackage.alarm.MultiWindowActivity.MWEnableMultiWindow
02-22 22:42:40.332 2906-2916/? W/dalvikvm﹕ VFY: unable to resolve static method 579: Landroid/sec/multiwindow/MultiWindow;.createInstance (Landroid/app/Activity;)Landroid/sec/multiwindow/MultiWindow;
02-22 22:42:40.332 2906-2916/? D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0005
02-22 22:42:40.332 2906-2916/? W/dalvikvm﹕ VFY: unable to find class referenced in signature (Landroid/sec/multiwindow/MultiWindow;)
02-22 22:42:40.332 2906-2916/? I/dalvikvm﹕ Could not find method android.sec.multiwindow.MultiWindow.isMultiWindow, referenced from method com.sec.android.app.clockpackage.alarm.MultiWindowActivity.MWIsMultiWindow_MW
02-22 22:42:40.332 2906-2916/? W/dalvikvm﹕ VFY: unable to resolve virtual method 581: Landroid/sec/multiwindow/MultiWindow;.isMultiWindow ()Z
02-22 22:42:40.332 2906-2916/? D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0014
the code of my activity when using this static instance is this
protected void onStart() {
super.onStart();
try {
if (DBconnection.getInstance(getApplicationContext()).hasData("Standing")) {
try {
StandingDataList = DBconnection.getInstance(getApplicationContext()).GetAllStanding();
Standing_adapter = new ExpandableAdapter(getApplicationContext(), StandingDataList);
Standing_ListView.setAdapter(Standing_adapter);
Standing_adapter.notifyDataSetChanged();
} catch (Exception e) {
e.getMessage();
}
and this is my database helper class
public class DBconnection extends SQLiteOpenHelper {
public static final String DBName="my.db";
public static final int Version=1;
private static DBconnection mInstance = null;
public static DBconnection getInstance(Context ctx) {
if (mInstance == null) {
mInstance = new DBconnection(ctx.getApplicationContext());
}
return mInstance;
}
private DBconnection(Context context) {
super(context, DBName, null, Version);
}
I have searched a lot for a solution with no luck, so please any help will be precious