Testning With Android Studio: Noclassdeffounderror: Org/testng/testng
So I am trying to use the built in testTool to generate some test for my mainActivity, so far I have managed to generate a test class and I got empty methods in it to test the meth
Solution 1:
Check your module structure. Probably one of your high level module folders doesn`t have dependencies. (You can link modules together and everything should work).
Go to -> File|Project structure|Modules|*your module*|Dependencies
.
It's not a TestNG issue, it's a module structure issue.
More detailed description Click This -> Link
Solution 2:
Try changing
testCompile 'junit:junit:4.12'
to
androidTestCompile 'junit:junit:4.12'
Also, make sure you are running it as an Android Test.
Post a Comment for "Testning With Android Studio: Noclassdeffounderror: Org/testng/testng"