【发布时间】: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