[Solved] Android Studio Generate APK Error: error_prone_annotations.jar (com.google.errorprone:error)

Android Studio failed to generate apk error:

Could not download error_prone_annotations.jar (com.google.errorprone:error)

 

Solution:

Modify the buildscript and allprojects in build.gradle file of your project:

google()jcenter()

to

maven { url ‘https://maven.aliyun.com/repository/google’ }maven { url ‘https://maven.aliyun.com/repository/jcenter’ }maven { url ‘http://maven.aliyun.com/nexus/content/groups/public’ }

Done!

Read More: