I am using Android Studio and I imported the project androidtest from here:
But there are some errors caused by a missing dependency.
How to solve these dependencies? I tried to sync gradle, but not worked.
The androidtest is not a project for Android studio therefore your gradle file is lacking of the right dependencies.
You should take this as reference: https://stackoverflow.com/a/27852368/2442831