Android could not resolve error
If you are sure there are no spelling errors in your dependency and that the project is hosted at the correct repo then most likely the issue is
Often you will get an error like
failed to resolve ...
Which may make it
Unable to compile on Android Studio 2 and sometimes Android studio 1.
Sometimes you might also get an error like
peer not authenticated
gradle-wrapper.propertiesto the latest gradle
Run gradle wrapper task from command line
cd ~/AndroidStudioProject/myproject/ myapp