Getting the below error at the time of running java program in android studio.
Error:Execution failed for task \':app:preDebugAndroidTestBuild\'.
Go to settings>editor> Then check those two boxes as displayed in the image. It should solve it without any issue.