SimpleTestCursor robolectric 3.0--编制问题 [英] SimpleTestCursor robolectric 3.0-- compilation issue
问题描述
我想测试光标在我的应用程序。
但下面的导入我得到message--无法解析符号错误
测试仪。我使用Robolectric 3.0。为什么进口不解决,我错过了一些依赖?我找了互联网,但不支持。请帮助。
我试图使用方法:<一href=\"http://robolectric.org/javadoc/2.4/org/robolectric/tester/android/database/SimpleTestCursor.html\"相对=nofollow>这个API 并以下是进口
进口org.robolectric.tester.android.database.SimpleTestCursor;
这是我的依赖关系:
{相关性
编译文件树(导演:'库',包括:['的* .jar'])
testCompileorg.robolectric:robolectric:3.0 testCompileorg.robolectric:阴影支持-V4:3.0
testCompile'的JUnit:JUnit的:4.12
编译com.android.support:appcompat-v7:22.2.0
编译com.google code.gson:GSON:2.3
编译com.android.support:support-v4:22.1.0
编译com.google.android.gms:播放服务:7.5.0
}
SimpleTestCursor已Robolectric第3版取代了RoboCursor。
看一看robolectric / robolectric-阴影/阴影核心/ src目录/主/ JAVA /组织/ robolectric /假货/ RoboCursor.java和robolectric / robolectric / src目录/测试/ JAVA /组织/ robolectric /假货/ RoboCursorTest的.java
I am trying to test the cursor in my app.
But for the following import I get the error message-- cannot resolve symbol tester. I am using Robolectric 3.0. Why the import is not resolving, am I missing some dependency? I have looked internet but no support. Please help.
I am trying to use:this API and following is the import
import org.robolectric.tester.android.database.SimpleTestCursor;
These are my dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile "org.robolectric:robolectric:3.0"
testCompile "org.robolectric:shadows-support-v4:3.0"
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.code.gson:gson:2.3'
compile 'com.android.support:support-v4:22.1.0'
compile 'com.google.android.gms:play-services:7.5.0'
}
SimpleTestCursor has been replaced by RoboCursor in version 3 of Robolectric.
Have a look at robolectric/robolectric-shadows/shadows-core/src/main/java/org/robolectric/fakes/RoboCursor.java and robolectric/robolectric/src/test/java/org/robolectric/fakes/RoboCursorTest.java.
这篇关于SimpleTestCursor robolectric 3.0--编制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!