解决失败:com.android.Support:appcompat-v7:26.0.0我在安卓工作室有这个问题。Error:(22, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.0<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/username/AndroidStudioProjects/ElectroSave/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>这是我的等级代码:apply plugin: 'com.android.application'android {
compileSdkVersion 26
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.noelly.myapplication"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.0.0'}
3 回答
![?](http://img1.sycdn.imooc.com/5333a1920001d36402200220-100-100.jpg)
绝地无双
TA贡献1946条经验 获得超4个赞
重要:支持库现在可以通过Google的Maven存储库获得。您不需要从SDK管理器下载支持存储库。有关更多信息,请参见支持库设置。
Play services
Firebase
build.gradle
allprojects { repositories { jcenter() maven { url "https://maven.google.com" } }}
google()
allprojects { repositories { jcenter() google() }}
最新情况:
build.gradle
allprojects { repositories { google() // If you're using a version of Gradle lower than 4.1, you must instead use: // maven { // url 'https://maven.google.com' // } // An alternative URL is 'https://dl.google.com/dl/android/maven2/' }}
appcompat
dependencies { compile 'com.android.support:appcompat-v7:26.1.0'}
- 3 回答
- 0 关注
- 4252 浏览
添加回答
举报
0/150
提交
取消