IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation

后端 未结 2 1192
栀梦
栀梦 2021-01-15 00:13

When I run my Android application, I encounter this NoClassDefFoundError:

03-13 18:06:38.648: E/AndroidRuntime(413): Uncaught handler: thread ma         


        
相关标签:
2条回答
  • 2021-01-15 00:32

    I just hit and solved this issue - you need to add all of the dependencies in your android project's pom.xml to your test projects pom.xml with a scope as provided

    per this bug report: http://code.google.com/p/maven-android-plugin/issues/detail?id=142

    e.g.

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.1</version>
                <scope>provided</scope>
            </dependency>
    
    0 讨论(0)
  • 2021-01-15 00:41

    NoClassDefFoundError exception is being raised. Basically class definition is not found in your project.

    Check the names of the class properly, and if you are using third party library check the name of the class properly and ensure that library is included (Class name is case sensitive).

    0 讨论(0)
提交回复
热议问题