gpt4 book ai didi

android - 无法解析 : com. android.support :appcompat-v7. 15

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:22:21 25 4
gpt4 key购买 nike

我刚刚在 elementary os 0.3.1(基于 Ubuntu 14.04 LTS)上安装了 Android Studio,但出现以下错误:

Error:(24, 13) Failed to resolve: com.android.support:appcompat-v7:15.+ 
Install Repository and sync project
Show in File
Show in Project Structure dialog

当我点击“Install Repository and sync project”时,出现这个错误:

Loading SDK information...
Ignoring unknown package filter 'extra-android-m2repository'
Warning:The package filter removed all packages. There is nothing to install.
Please consider trying to update again without a package filter.

我的build.gradle(模块:app)

apply plugin: 'com.android.application'

android {
compileSdkVersion 15
buildToolsVersion "19.1.0"

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

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:15.+'
}

我的build.gradle(项目:HappyBirthday)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

最佳答案

从 Android Studio 转到:工具 >> Android >> SDK 管理器选择并安装“Extras|Android Support Repository”

如果没有帮助,请发布您的 gradle 文件。

关于android - 无法解析 : com. android.support :appcompat-v7. 15,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32914794/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com