gpt4 book ai didi

android - 非法访问错误 : Class ref in pre-verified class resolved to unexpected implementation

转载 作者:搜寻专家 更新时间:2023-11-01 08:10:57 24 4
gpt4 key购买 nike

当我运行我的 Android 应用程序时,我遇到了这个 NoClassDefFoundError:

03-13 18:06:38.648: E/AndroidRuntime(413): Uncaught handler: thread main exiting due to uncaught exception
03-13 18:06:38.688: E/AndroidRuntime(413): java.lang.NoClassDefFoundError: com.InternetGMBH.ThousandPS.Activities.DealerDetailsDisplay
03-13 18:06:38.688: E/AndroidRuntime(413): at com.InternetGMBH.ThousandPS.Activities.DealerListAdapter$1.onClick(DealerListAdapter.java:76)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.View.performClick(View.java:2364)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.View.onTouchEvent(View.java:4179)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.widget.TextView.onTouchEvent(TextView.java:6540)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.View.dispatchTouchEvent(View.java:3709)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.os.Handler.dispatchMessage(Handler.java:99)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.os.Looper.loop(Looper.java:123)
03-13 18:06:38.688: E/AndroidRuntime(413): at android.app.ActivityThread.main(ActivityThread.java:4363)
03-13 18:06:38.688: E/AndroidRuntime(413): at java.lang.reflect.Method.invokeNative(Native Method)
03-13 18:06:38.688: E/AndroidRuntime(413): at java.lang.reflect.Method.invoke(Method.java:521)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
03-13 18:06:38.688: E/AndroidRuntime(413): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-13 18:06:38.688: E/AndroidRuntime(413): at dalvik.system.NativeStart.main(Native Method)
03-13 18:06:38.688: E/AndroidRuntime(413): Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
03-13 18:06:38.688: E/AndroidRuntime(413): at dalvik.system.DexFile.defineClass(Native Method)
03-13 18:06:38.688: E/AndroidRuntime(413): at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
03-13 18:06:38.688: E/AndroidRuntime(413): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
03-13 18:06:38.688: E/AndroidRuntime(413): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
03-13 18:06:38.688: E/AndroidRuntime(413): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)

如何解决这个问题?

最佳答案

我刚刚遇到并解决了这个问题 - 你需要将你的 android 项目的 pom.xml 中的所有依赖项添加到你的测试项目 pom.xml 中,并提供一个范围

根据这个错误报告: http://code.google.com/p/maven-android-plugin/issues/detail?id=142

例如

        <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
<scope>provided</scope>
</dependency>

关于android - 非法访问错误 : Class ref in pre-verified class resolved to unexpected implementation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9684281/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com