Java.lang.IllegalAccessError:Class ref in Pre-verified Class resolved to unexpected Implementatio

Source: Internet
Author: User

error message : java.lang.IllegalAccessError:Class ref inpre-verified Class resolved to unexpected Implementatio


Scenario : When loading apk, jar dynamically


Error Analysis : This is usually a reference repetition (that is, your current apk and the apk you want to load, there is a duplicate reference between the jar), like in my project encountered the problem is: the loaded apk selected minimum version under 4.0, need to reference Android.support.v7.app.ActionBarActivity, this package, but the package is also used in the new project, so run to Context.getclassloader (). LoadClass will report the above error,

Workaround: The minimum version of the new project should be more than 4.0, OK, because the minimum version after 4.0, do not need to reference Android.support.v7.app.ActionBarActivity This package, minimum version before 4.0, need to reference android.support.v7.app.ActionBarActivity this package

Java.lang.IllegalAccessError:Class ref in Pre-verified Class resolved to unexpected Implementatio

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.