Android Studio Gradle build failed. Error:Cause: peer not authenticated

This was the solution that worked for me. Posting here in case it helps someone.

Gradle version was not correct in project build.gradle file.

I had

classpath 'com.android.tools.build:gradle:1.0.0'

but this needed to be

classpath 'com.android.tools.build:gradle:2.1.0'

Note:
This should be updated to the newest version of gradle tools which can be found here
Android Studio also recommends the latest plugin version.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)