I am using the junit-4.12 external library package in my Android Studio project. For some reason, when I import "import org.junit.Before;" into my java class I get the error "cannot resolve symbol 'Before'" (this is also happening with 'Test'), even though I can see that the files exists in my junit package (see image). I also have the dependency listed in my gradle (see 2nd image).
I noticed that someone else asked a similar question and the response was "Make sure that if JUnit is declared as < scope>test< / scope >, that your test class is in src/test, otherwise it won't be able to see the dependency."
Maybe this is my problem, but I am not sure how to make sure that my "test class is in src/test". (I am new to android studio... so sorry if this is a simple question)
Aucun commentaire:
Enregistrer un commentaire