在Android Studio中,我收到一条错误消息,提示"Packages unavailable".而且我需要的软件包不可用 [英] In Android studio, I'm getting an error that says "Packages unavailable" and that a package I need is not available
问题描述
在Android Studio中,
In Android Studio,
我在构建应用程序时遇到错误.
I'm getting an error about building my app.
Error:Failed to find Build Tools revision 26.1.0
<a href="install.build.tools">Install Build Tools 26.1.0 and sync project</a>
这将导致一个蓝色的安装链接,但是当我单击它时,出现一条错误消息,告诉我软件包不可用"和软件包不可用".
This results in a blue install link, but when I click it I get an error telling me that, "Package Unavailable" and that "Packages are unavailable."
这是我的build.gradle的样子
Here's what my build.gradle looks like
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
lintOptions {
abortOnError false
}
defaultConfig {
applicationId "com.example.leoconnelly.connexus"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildToolsVersion '26.1.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:design:26.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
//Helpshift
// use version 26.1.0 instead of 26.0.2
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation('com.helpshift:android-helpshift-en-aar:6.4.2') {
exclude group: 'com.android.support'
exclude module: 'design'
exclude module: 'recyclerview'
exclude module: 'cardview-v7'
}
}
如何解决此问题?我已经尝试过弄乱我的SDK管理器.我到目前为止发现的所有解决方案都行不通.
How do I resolve this issue? I've tried messing wth my SDK manager already. All the solutions I've found insofar do not work.
我试图在一个全新的项目上安装26.0.1,但我遇到了同样的问题.
I tried installing 26.0.1 on an a brand new project and I had the same issue.
推荐答案
您只需要移至SDK Platform 8.0.
You just have to move to SDK Platform 8.0.
对于目标和最小api来说,它不会为您带来任何改变,并且这些应用仍可以在较旧的Android版本上运行.
It won't change things for you regarding target and min api, and the apps will still work on older Android version.
只需下载此文件并将其解压缩即可.
Just download this file and extract it.
https://dl.google.com/android /repository/build-tools_r26.0.2-windows.zip
从[android-8.1.0]复制所有文件,然后将其移至
copy all files from [android-8.1.0] and move them into
C:\Users\user\AppData\Local\Android\Sdk\build-tools\26.0.1
这篇关于在Android Studio中,我收到一条错误消息,提示"Packages unavailable".而且我需要的软件包不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!