!!! JUnit version 3.8 or later expected:
!!! JUnit version 3.8 or later expected: java.lang.RuntimeException: Stub! at junit.runner.BaseTestRunner.<init>(BaseTestRunner.java:5) at junit.textui.TestRunner.<init>(TestRunner.java:54) at junit.textui.TestRunner.<init>(TestRunner.java:48) at junit.textui.TestRunner.<init>(TestRunner.java:41) at com.intellij.rt.execution.junit.JUnitStarter.junitVersionChecks(JUnitStarter.java:233) at com.intellij.rt.execution.junit.JUnitStarter.canWorkWithJUnitVersion(JUnitStarter.java:216) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Process finished with exit code -3
Run->EditConfigを開く。
Android JUnitを選ぶ。
JREを1.8に変更したら、エラーがでなくなった。
パッケージorg.junitは存在しません
Eclipseから移行したプロジェクトで、gradleを使わないでUnitTestできないのかな?
Error:(3, 24) java: パッケージorg.junitは存在しません
</content> <orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module-library"> + <library name="JUnit4"> + <CLASSES> + <root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar!/" /> + <root url="jar://$APPLICATION_HOME_DIR$/lib/hamcrest-core-1.3.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> </component> </module> No newline at end of file
Migrate Project to Gradle?
Migrate Project to Gradle? This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system. More Information about migrating to Gradle Don't show this message again.