Question

Just updated my SDK to r20 and wanted to test out my app on an Ice Cream Sandwich 4.1 emulator. I get only 6 lines into my app when it crashes just trying to create a new database:

 gradeBookDbAdapter mDbHelper = new gradeBookDbAdapter(this);  <--- fails here

 private static class DatabaseHelper extends SQLiteOpenHelper {

    DatabaseHelper(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }

    public gradeBookDbAdapter(Context ctx) {                <-- but it never gets here
    this.mCtx = ctx;
    }
  <snip...</snip>

I can't even to any executable code with the constructor before it crashes with "java.lang.VerifyError:"

I'm using an external Library, Jexecelapi, to read/write Excel files. This has been working flawlessly since I first included it 3 major revisions ago. But now my LogCat says:

07-08 18:21:38.185: I/dalvikvm(861): Could not find method jxl.Workbook.getWorkbook,     referenced from method com.ulsanonline.gradebook2.gradeBookDbAdapter.readExcel
07-08 18:21:38.185: W/dalvikvm(861): VFY: unable to resolve static method 1084: Ljxl/Workbook;.getWorkbook (Ljava/io/File;)Ljxl/Workbook;
07-08 18:21:38.185: D/dalvikvm(861): VFY: replacing opcode 0x71 at 0x001b
07-08 18:21:38.185: W/dalvikvm(861): VFY: unable to resolve exception class 290 (Ljxl/read/biff/BiffException;)
07-08 18:21:38.185: W/dalvikvm(861): VFY: unable to find exception handler at addr 0x5c
07-08 18:21:38.185: W/dalvikvm(861): VFY:  rejected Lcom/ulsanonline/gradebook2/gradeBookDbAdapter;.readExcel (Ljava/lang/String;)V
07-08 18:21:38.185: W/dalvikvm(861): VFY:  rejecting opcode 0x0d at 0x005c
07-08 18:21:38.185: W/dalvikvm(861): VFY:  rejected Lcom/ulsanonline/gradebook2/gradeBookDbAdapter;.readExcel (Ljava/lang/String;)V
07-08 18:21:38.185: W/dalvikvm(861): Verifier rejected class Lcom/ulsanonline/gradebook2/gradeBookDbAdapter;
07-08 18:21:38.195: D/AndroidRuntime(861): Shutting down VM
07-08 18:21:38.195: W/dalvikvm(861): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
07-08 18:21:38.205: E/AndroidRuntime(861): FATAL EXCEPTION: main
07-08 18:21:38.205: E/AndroidRuntime(861): java.lang.VerifyError: com/ulsanonline/gradebook2/gradeBookDbAdapter

So I didn't notice in my first post the logcat text above the crash and was just going from the main error south. Any reason my library would be failing now?

Was it helpful?

Solution

turns out with the new SDK I had to put the libraries that I referenced in the /libs folder. That seems to have fixed things. –

OTHER TIPS

1.open your .classpath file at your project dir.

2.add the exported="true" into the classpathentry tag. such as :

old: classpathentry kind="lib" path="libs/httpmime-4.0.1.jar"

new: classpathentry exported="true" kind="lib" path="libs/httpmime-4.0.1.jar"

3.save and retry.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top