On Apr 3, 3:09 am, Naresh Samba <[email protected]> wrote:
> " Class ref in pre-verified class resolved to unexpected
> implementation"
>
> This i believe because the dex conversion of the class didn't match
> with wat was available as a shared library on the device?

If you look at the logcat output (via "adb logcat" or DDMS) you will
see some additional details.

The short explanation: your APK is run through dexopt, which has
available to it the bootstrap DEX files and the APK.  References to
classes, fields, and methods defined by these are verified and
optimized by dexopt.  References to other classes (e.g. something you
include with "uses-library") are not, and verification is deferred to
the first time the class is loaded.

If your APK refers to a class, and it is resolved at dexopt time, and
at run time it resolves to a different implementation of the same
class, the VM gets upset and throws an exception.  If it doesn't do
this, the assumptions baked into the pre-verified / pre-optimized DEX
file will cause weird behavior or crashes.  The easiest way to avoid
this is to not have more than one implementation of a given class.

The detailed explanation: 
http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/dexopt.html

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to