Error:(3, 17) error: package org.junit does not exist
Error:(5, 24) error: package org.junit does not exist
Error:(11, 6) error: cannot find symbol class Test
Error:(13, 9) error: cannot find symbol method assertEquals(int,int)
:app:compileDebugUnitTestJavaWithJavac FAILED
Error:Execution failed for task ':app:compileDebugUnitTestJavaWithJavac'
.
Compilation failed; see the compiler error output for details.
When i run rebuild, errors are those. But i can run my appwithout rebuild.
I dont use test, i dont know how it came to my folders.
The code is:
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}