3

I got this error attempting to install and test an Android build from eclipse:

Installation error: INSTALL_FAILED_DEXOPT

And logcat reveals this:

07-02 21:49:44.924: E/dalvikvm(863): Invalid type descriptor: 'Lcom/mypackagename/MyClass;'

So I delete the offending class and comment out the reference to it. Then it builds and installs fine.

Now that class name is forever cursed in this project. Even if I create a trivial subclass of java.lang.Object and give it that class name the error resurfaces.

Wiping and restarting the emulator doesn't help. Cleaning the project and restarting eclipse doesn't help.

How did things get screwed-up this badly, and what can I do to fix it?

Dave Morgan
  • 429
  • 4
  • 13

1 Answers1

2

Got lucky and figured this out. If I hadn't happend to look in bin/classes I never would have gotten through it.

I looked at the generated class file in bin/classes and noticed that the filename had a "?" in it. Somehow when I created the class an invalid character (in this case 0x10) got in the middle of the name. (Let's assume I fat-fingered it when I was typing, which is the most likely explanation.)

The reason the problem still occurred when I created the dummy class is that I was pasting the old corrupted name (it was a fairly long class name).

All I had to do to fix it was refactor>rename and type the name manually.

Dave Morgan
  • 429
  • 4
  • 13