0

Scala でインストルメンテーション テストを作成しようとしています(完全なコードはこちら)。

java.lang.IncompatibleClassChangeError: Couldn't find scala.reflect.ScalaSignature.bytes実行時エラーの原因は何ですか?

私は維持しようとしてscala.reflect.ScalaSignature.bytesbuild.sbtます:

proguardOptions ++=
    "-dontwarn android.test.**" ::
    "-dontwarn org.scalatest.**" ::
    "-dontwarn scala.xml.**" ::
    "-dontwarn slick.jdbc.**" ::
    "-dontwarn org.slf4j.**" ::
    "-dontwarn org.junit.**" ::
    "-dontobfuscate" ::
    "-dontnote ** "  ::
    "-dontpreverify" ::
    "-optimizations !code/simplification/arithmetic" ::
    "-keep class android.support.test.** { *; }" ::
    "-keep class scala.reflect.ScalaSignature.** {*;}" ::
    "-keep class com.mypackage.** { *; }" ::
    "-keep class * extends junit.framework.TestCase { *; }" ::
    "-keepclasseswithmembers class * { @org.junit.** *; }" ::
    "-keepclassmembers class * { ** bytes();}"::
    "-keep class android.support.test.** { *; }" ::
    "-keep class org.junit.** { *; }" ::
    Nil

しかし、それは役に立たないようです。

完全なスタック トレース:

 E  ( 9562) TestExecutor: Fatal exception when running tests
 E  ( 9562) TestExecutor: java.lang.IncompatibleClassChangeError: Couldn't find scala.reflect.ScalaSignature.bytes
 E  ( 9562) TestExecutor:       at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:659)
 E  ( 9562) TestExecutor:       at libcore.reflect.AnnotationAccess.annotationSetToAnnotations(AnnotationAccess.java:633)
 E  ( 9562) TestExecutor:       at libcore.reflect.AnnotationAccess.getDeclaredAnnotations(AnnotationAccess.java:161)
 E  ( 9562) TestExecutor:       at libcore.reflect.AnnotationAccess.getAnnotations(AnnotationAccess.java:111)
 E  ( 9562) TestExecutor:       at java.lang.Class.getAnnotations(Class.java:369)
 E  ( 9562) TestExecutor:       at org.junit.runner.Description.createSuiteDescription(Description.java:124)
 E  ( 9562) TestExecutor:       at org.junit.internal.runners.ErrorReportingRunner.getDescription(ErrorReportingRunner.java:28)
 E  ( 9562) TestExecutor:       at org.junit.runners.Suite.describeChild(Suite.java:123)
 E  ( 9562) TestExecutor:       at org.junit.runners.Suite.describeChild(Suite.java:27)
 E  ( 9562) TestExecutor:       at org.junit.runners.ParentRunner.shouldRun(ParentRunner.java:434)
 E  ( 9562) TestExecutor:       at org.junit.runners.ParentRunner.filter(ParentRunner.java:382)
 E  ( 9562) TestExecutor:       at org.junit.runner.manipulation.Filter.apply(Filter.java:97)
 E  ( 9562) TestExecutor:       at android.support.test.internal.runner.TestRequestBuilder$LenientFilterRequest.getRunner(TestRequestBuilder.java:381)
 E  ( 9562) TestExecutor:       at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
 E  ( 9562) TestExecutor:       at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
 E  ( 9562) TestExecutor:       at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
 E  
4

1 に答える 1

2
-keep class scala.reflect.ScalaSignature {*;}

いいえ**

于 2016-08-14T14:53:42.113 に答える