1
我一直在嘗試幾個小時來獲得一個簡單的Roboelectric測試類來編譯。所有紅色的項目都找不到,因此會引發編譯錯誤。Roboelectric和Android工作室問題
dependencies {
// Robolectric
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.apache.maven:maven-ant-tasks:2.1.3' // fixes linux/mac
testCompile 'org.robolectric:robolectric:3.0'
}
有人嗎?什麼? – Mike6679
在哪個文件夾中是類?它應該在'src/test/java/' –
我還會在同一個包中測試與被測試的類 –