博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Could not find support-annotations.jar (com.android.support:support-annotations:25.1.1)问题解决办法
阅读量:4204 次
发布时间:2019-05-26

本文共 1334 字,大约阅读时间需要 4 分钟。

Could not find support-annotations.jar (com.android.support:support-annotations:25.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/’ }挪上去即可,让它先下载

转载地址:http://axvli.baihongyu.com/

你可能感兴趣的文章