【问题标题】:android - could not find support-annotations.jarandroid - 找不到 support-annotations.jar
【发布时间】:2016-12-28 02:37:48
【问题描述】:

我正在尝试将项目与 Gradle 同步。但是 gradle 给出了一些错误。

错误代码如下:错误:配置项目':app'时出现问题。

找不到 support-annotations.jar (com.android.support:support-annotations:24.0.0)。 在以下位置搜索: https://jcenter.bintray.com/com/android/support/support-annotations/24.0.0/support-annotations-24.0.0.jar

我的 build.gradle 文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.1"

repositories {
    mavenCentral()
}

defaultConfig {
    applicationId "com.example.ileem.tiiu"
    minSdkVersion 16
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

 dependencies {
   compile fileTree(include: ['*.jar'], dir: 'libs')
 testCompile 'junit:junit:4.12'
 compile 'com.android.support:appcompat-v7:24.0.0-alpha2'
 compile 'com.android.support:design:24.0.0-alpha2'
 compile 'com.facebook.android:facebook-android-sdk:4.0.0'
 compile 'com.google.android.gms:play-services:9.0.0'
 compile 'com.google.maps.android:android-maps-utils:0.4'
 compile 'com.google.firebase:firebase-messaging:9.6.1'
 compile 'com.squareup.okhttp3:okhttp:3.2.0'

 compile files('libs/gson-2.2.4.jar')
 compile files('libs/jsoup-1.10.1.jar')

}
apply plugin: 'com.google.gms.google-services'

【问题讨论】:

    标签: android


    【解决方案1】:

    尝试升级到最新版本的构建工具和支持库。你可以找到他们here

    【讨论】:

      猜你喜欢
      • 2017-10-20
      • 1970-01-01
      • 2013-08-27
      • 1970-01-01
      • 1970-01-01
      • 2019-04-07
      • 2018-11-09
      • 2018-11-13
      • 1970-01-01
      相关资源
      最近更新 更多