Tôi mới sử dụng thử nghiệm Roboelectric. Tôi đang cố gắng theo dõi this bài đăng để kiểm tra các đoạn. Tôi đang sử dụng sau khi sự phụ thuộcCác đoạn thử nghiệm Roboelectric 3.0
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile "org.robolectric:robolectric: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'
}
Nhưng nhập này đem lại cho tôi những vấn đề biên soạn, và tôi không thể giải quyết các biểu tượng SupportFragmentTestUtil để bắt đầu. Vui lòng hướng dẫn tôi những gì tôi đang mất tích ??
org.robolectric.shadows.support.v4.SupportFragmentTestUtil
Không sao chép và dán. Sử dụng 'SupportFragmentTestUtil' với' testCompile 'org.robolectric: robolectric: 3.0 "' –
Cảm ơn bạn đã quan tâm đến Jared. Tôi đã cập nhật vấn đề của mình. Tôi ngạc nhiên, tôi không thấy điều này, không có gói hỗ trợ –
Vui lòng xem câu trả lời @Nicks. –