Android 使用带有minify和proguard的房间ORM测试

Android 使用带有minify和proguard的房间ORM测试,android,sqlite,proguard,android-room,Android,Sqlite,Proguard,Android Room,我在我的项目中使用了room ORM,一切都很好,但当我使用minifyminifyEnabled true测试项目时,我遇到了这个错误,我尝试了很多次,但都没有成功。及下列警告: Information:Gradle tasks [:app:assembleDebug, :app:assembleDebugAndroidTest] Warning:org.hamcrest.integration.EasyMock2Adapter: can't find superclass or interf

我在我的项目中使用了room ORM,一切都很好,但当我使用minify
minifyEnabled true
测试项目时,我遇到了这个错误,我尝试了很多次,但都没有成功。及下列警告:

Information:Gradle tasks [:app:assembleDebug, :app:assembleDebugAndroidTest]
Warning:org.hamcrest.integration.EasyMock2Adapter: can't find superclass or interface org.easymock.IArgumentMatcher
Warning:org.hamcrest.integration.JMock1Adapter: can't find superclass or interface org.jmock.core.Constraint
Warning:library class android.test.AndroidTestCase extends or implements program class junit.framework.TestCase
Warning:library class android.test.AndroidTestRunner extends or implements program class junit.runner.BaseTestRunner
Warning:library class android.test.InstrumentationTestCase extends or implements program class junit.framework.TestCase
Warning:library class android.test.InstrumentationTestSuite extends or implements program class junit.framework.TestSuite
Warning:library class android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests extends or implements program class junit.framework.TestCase
Warning:android.support.test.espresso.core.deps.guava.cache.Striped64: can't find referenced class sun.misc.Unsafe
Warning:android.support.test.espresso.core.deps.guava.cache.Striped64$1: can't find referenced class sun.misc.Unsafe
Warning:android.support.test.espresso.core.deps.guava.cache.Striped64$Cell: can't find referenced class sun.misc.Unsafe
Warning:android.support.test.espresso.core.deps.guava.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator: can't find referenced class sun.misc.Unsafe
Warning:android.support.test.espresso.core.deps.guava.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1: can't find referenced class sun.misc.Unsafe
Warning:android.support.test.runner.MonitoringInstrumentation: can't find referenced method 'android.app.Instrumentation$ActivityResult execStartActivity(android.content.Context,android.os.IBinder,android.os.IBinder,android.app.Activity,android.content.Intent,int)' in program class android.support.test.internal.runner.hidden.ExposedInstrumentationApi
Warning:android.support.test.runner.MonitoringInstrumentation: can't find referenced method 'android.app.Instrumentation$ActivityResult execStartActivity(android.content.Context,android.os.IBinder,android.os.IBinder,android.app.Activity,android.content.Intent,int,android.os.Bundle)' in program class android.support.test.internal.runner.hidden.ExposedInstrumentationApi
Warning:android.support.test.runner.MonitoringInstrumentation: can't find referenced method 'android.app.Instrumentation$ActivityResult execStartActivity(android.content.Context,android.os.IBinder,android.os.IBinder,android.app.Fragment,android.content.Intent,int,android.os.Bundle)' in program class android.support.test.internal.runner.hidden.ExposedInstrumentationApi
Warning:com.squareup.javawriter.JavaWriter: can't find referenced class javax.lang.model.element.Modifier
Warning:org.hamcrest.JMock1Matchers: can't find referenced class org.jmock.core.Constraint
Warning:org.hamcrest.beans.HasPropertyWithValue: can't find referenced class java.beans.PropertyDescriptor
Warning:org.hamcrest.beans.HasPropertyWithValue$2: can't find referenced class java.beans.PropertyDescriptor
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.PropertyDescriptor
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.Introspector
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.BeanInfo
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.IntrospectionException
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.PropertyDescriptor
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.Introspector
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.BeanInfo
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.PropertyDescriptor
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.IntrospectionException
Warning:org.hamcrest.beans.PropertyUtil: can't find referenced class java.beans.PropertyDescriptor
Warning:org.hamcrest.beans.SamePropertyValuesAs: can't find referenced class java.beans.PropertyDescriptor
Warning:org.hamcrest.beans.SamePropertyValuesAs$PropertyMatcher: can't find referenced class java.beans.PropertyDescriptor
Warning:org.hamcrest.integration.EasyMock2Adapter: can't find referenced class org.easymock.EasyMock
Warning:org.hamcrest.integration.EasyMock2Adapter: can't find referenced class org.easymock.IArgumentMatcher
Warning:org.hamcrest.integration.EasyMock2Adapter: can't find referenced class org.easymock.EasyMock
Warning:org.hamcrest.integration.EasyMock2Adapter: can't find referenced class org.easymock.IArgumentMatcher
Warning:org.hamcrest.integration.JMock1Adapter: can't find referenced class org.jmock.core.Constraint
Warning:org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ManagementFactory
Warning:org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ThreadMXBean
Warning:org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ManagementFactory
Warning:org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ThreadMXBean
Warning:org.junit.rules.DisableOnDebug: can't find referenced class java.lang.management.ManagementFactory
Warning:org.junit.rules.DisableOnDebug: can't find referenced class java.lang.management.RuntimeMXBean
Warning:org.junit.rules.DisableOnDebug: can't find referenced class java.lang.management.ManagementFactory
Warning:org.junit.rules.DisableOnDebug: can't find referenced class java.lang.management.RuntimeMXBean
Warning:there were 118 unresolved references to classes or interfaces.
Warning:there were 5 instances of library classes depending on program classes.
Warning:there were 3 unresolved references to program class members.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForDebugAndroidTest'.
> Job failed, see logs for details
Information:BUILD FAILED
Information:Total time: 8.388 secs
Information:1 error
Information:48 warnings
Information:See complete output in console
我想我需要为这个
android.arch.persistence.room:testing:1.0.0-alpha9
添加一些规则,但我不知道是什么。 谢谢你的帮助