0

尝试VerifyError使用fest-android. 尝试加载我自己的类之一时发生错误:

java.lang.VerifyError: bbct/android/common/layout/test/BaseballCardDetailsLayoutTest

根据我的阅读,这意味着一个类不是 DEX 格式。但是这个类在我的 Android Studio 项目中,应该通过构建过程进行转换。当然,正如我之前所说,我正在尝试使用fest-android. build.gradle除了在我的文件中添加依赖项之外,我还需要做些什么特别的事情吗?

更多信息:

仔细查看我的 logcat,我发现了以下消息:

06-24 19:19:31.450  19696-19696/? W/dalvikvm﹕ Class resolved by unexpected DEX: Landroid/support/v7/app/ActionBarActivity;(0xb5734830):0xad59e000 ref [Landroid/support/v4/app/FragmentActivity;] Landroid/support/v4/app/FragmentActivity;(0xb5734830):0xad9b4000
06-24 19:19:31.450  19696-19696/? W/dalvikvm﹕ (Landroid/support/v7/app/ActionBarActivity; had used a different Landroid/support/v4/app/FragmentActivity; during pre-verification)
06-24 19:19:31.450  19696-19696/? W/dalvikvm﹕ Unable to resolve superclass of Landroid/support/v7/app/ActionBarActivity; (235)
06-24 19:19:31.450  19696-19696/? W/dalvikvm﹕ Link of class 'Landroid/support/v7/app/ActionBarActivity;' failed
06-24 19:19:31.450  19696-19696/? W/dalvikvm﹕ Unable to resolve superclass of Lbbct/android/common/activity/FragmentTestActivity; (723)
06-24 19:19:31.450  19696-19696/? W/dalvikvm﹕ Link of class 'Lbbct/android/common/activity/FragmentTestActivity;' failed
06-24 19:19:31.450  19696-19696/? E/dalvikvm﹕ Could not find class 'bbct.android.common.activity.FragmentTestActivity', referenced from method bbct.android.common.layout.test.BaseballCardDetailsLayoutTest.<init>
4

1 回答 1

1

我终于能够通过更改我的build.gradle文件来解决这个问题

androidTestCompile com.squareup:fest-android:1.0.8

androidTestCompile ('com.squareup:fest-android:1.0.8') {
    exclude group: 'com.android.support'
}
于 2014-06-25T23:06:35.223 回答