Could not find support-annotations.jar (com.android.support:support-annotations:27.1.1)问题解决办法

 

Could not find support-annotations.jar (com.android.support:support-annotations:27.1.1)问题解决办法_第1张图片

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not find support-annotations.jar (com.android.support:support-annotations:27.1.1).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/support-annotations/27.1.1/support-annotations-27.1.1.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

CONFIGURE FAILED

Total time: 12.839 secs
Could not find support-annotations.jar (com.android.support:support-annotations:27.1.1).
Searched in the following locations:
    https://jcenter.bintray.com/com/android/support/support-annotations/27.1.1/support-annotations-27.1.1.jar

某一天编译版本忽然出现这个问题,在网上查找了几个方法都不行,后来发现自己的repositories是这样写的:

repositories {
        jcenter()
        mavenCentral()
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
    }

先执行了jcenter,这个时候没找到com.android.support:support-annotations:27.1.1,就直接报错了,不会再继续往下执行。

解决办法如下:

repositories {
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        jcenter()
        mavenCentral()
    }

将maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }挪上去即可,让它先下载

 

你可能感兴趣的:(Could not find support-annotations.jar (com.android.support:support-annotations:27.1.1)问题解决办法)