【问题标题】:Failed to find target with hash string 'android-25' does not disappear while SDK 25 is installed安装 SDK 25 时,找不到带有哈希字符串“android-25”的目标不会消失
【发布时间】:2017-04-18 08:15:56
【问题描述】:

Android Studio 我遇到了错误:

Failed to find target with hash string 'android-25' in: [path]
Possible cause: Build properties not found for package Android SDK Platform 25

没问题,我想,所以根据post,我只是安装了缺少的Android SDK:

但是我仍然遇到这个问题。即使在重建项目之后 并重启Android Studio

build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.1.0'
    defaultConfig {
        applicationId "com.sample.app"
        minSdkVersion 21
        targetSdkVersion 25
        versionCode 1
        versionName "1.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
repositories {
    maven {
        url "https://jitpack.io"
    }
    mavenCentral()
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'
    // Google libraries
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.android.support:design:25.1.0'
    compile 'com.android.support:support-v4:25.1.0'
    compile 'com.google.android.gms:play-services-vision:10.0.1'
    compile 'com.android.volley:volley:1.0.0'
    // Third party libraries
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.github.paolorotolo:appintro:4.1.0'
    compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
    compile 'org.greenrobot:eventbus:3.0.0'
    compile 'com.afollestad.material-dialogs:commons:0.8.6.0'
    compile 'com.alexvasilkov:gesture-views:2.1.1'
    compile 'org.adw.library:discrete-seekbar:1.0.1'
    compile 'com.squareup.picasso:picasso:2.5.2'

    compile files('libs/activation.jar')
    compile files('libs/additionnal.jar')
    compile files('libs/mail.jar')
    compile 'com.android.support:recyclerview-v7:25.1.0'
    compile 'com.android.support:cardview-v7:25.1.0'
}

注意:我已删除所有已安装的 Android SDK 并重新安装。不幸的是,这并没有帮助。

我还能做些什么来解决这个问题?

这是我的独立 SDK 管理器的屏幕截图:

【问题讨论】:

  • 发帖build.gradle
  • @IntelliJAmiya 我更新了我的帖子

标签: java android android-studio gradle


【解决方案1】:

从您的菜单中启动独立 SDK 管理器,您可以查看安装了该 API 级别的哪些组件。有些可能仍未安装、选择和更新。

【讨论】:

  • 在独立的 SDK 管理器中,我更新了 SDK 构建工具,但我再次收到错误消息。请查看我添加到帖子中的屏幕截图
猜你喜欢
  • 2017-03-20
  • 2017-05-02
  • 1970-01-01
  • 2018-04-07
  • 1970-01-01
  • 2020-01-16
  • 2018-11-23
  • 1970-01-01
  • 2016-06-26
相关资源
最近更新 更多