本文介绍了无法解析:com.android.support:appcompat-v7.15的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装的Andr​​oid工作室的基本OS 0.3.1(基于Ubuntu 14.04 LTS),但我得到了以下错误:

 错误:(24,13)无法解析:com.android.support:appcompat-v7:15.+
安装库和同步工程
展文件
展项目结构对话框

当我点击安装库和同步工程,我得到这个错误:

 加载SDK信息...
忽略未知的包过滤超Android的m2repository
警告:包过滤器除去所有软件包。没有什么可以安装。
     请考虑尝试没有一个包过滤器再次更新。

我的build.gradle(模块:应用程序)

 应用插件:'com.android.application安卓{
    compileSdkVersion 15
    buildToolsVersion19.1.0    defaultConfig {
        的applicationIDcom.example.android.happybirthday
        15的minSdkVersion
        targetSdkVersion 15
        版本code 1
        的versionName1.0
    }
    buildTypes {
        发布 {
            minifyEnabled假
            proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
        }
    }
}依赖{
    编译文件树(导演:'库',包括:['的* .jar'])
    testCompile'的JUnit:JUnit的:4.12
    编译com.android.support:appcompat-v7:15.+
}

我的build.gradle(项目:HappyBirthday)

  //顶级构建文件,您可以添加常用的配置选项,所有分项目/模块。buildscript {
    库{
        jcenter()
    }
    依赖{
        类路径'com.android.tools.build:gradle:1.3.0        //注意:不要在这里把你的应用程序依赖关系;他们属于
        //在单个模块的build.gradle文件
    }
}allprojects {
    库{
        jcenter()
    }
}任务清除(类型:删除){
    删除rootProject.buildDir
}


解决方案

得到了同样的错误。

Mac OSX版

诉10.9.5

Android的工作室1.4.1

的build.gradle:

在:结果的Andr​​oid {compileSdkVersion 15 buildToolsVersion19.1.0

后:结果的Andr​​oid {compileSdkVersion 23 buildToolsVersion19.1.0

在:结果相关性{编译文件树(导演:'库',包括:['的* .jar'])testCompile'的JUnit:JUnit的:4.12编译com.android.support:appcompat-v7:15 +'}

后:结果相关性{编译文件树(导演:'库',包括:['的* .jar'])testCompile'的JUnit:JUnit的:4.12编译com.android.support:appcompat-v7:23.1 0.0'}结果搜索结果
AndroidStudioProjects>APP_NAME>应用程序>的build.gradle结果

 应用插件:'com.android.application安卓{
compileSdkVersion 23
buildToolsVersion23.0.2defaultConfig {
    的applicationIDcom.example.johnkonderla.condor_paint
    16的minSdkVersion
    targetSdkVersion 23
    版本code 1
    的versionName1.0
}
buildTypes {
    发布 {
        minifyEnabled假
        proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
    }
}
}依赖{
编译文件树(导演:'库',包括:['的* .jar'])
testCompile'的JUnit:JUnit的:4.12
编译com.android.support:appcompat-v7:23.1.0
编译com.android.support:design:23.1.0
}

上述变化+构建>>清理项目。

希望帮助!

I just installed Android Studio on elementary os 0.3.1 (based on Ubuntu 14.04 LTS), but I get the following error:

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

When I click on "Install Repository and sync project", I get this error:

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.

My build.gradle (Module: 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.+'
}

My build.gradle (Project: 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
}
解决方案

Got same errors.

Mac OSX

V. 10.9.5

Android studio 1.4.1

build.gradle:

Before:
android { compileSdkVersion 15 buildToolsVersion "19.1.0"

After:
android { compileSdkVersion 23 buildToolsVersion "19.1.0"

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

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


AndroidStudioProjects > 'app_name' > app > build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.example.johnkonderla.condor_paint"
    minSdkVersion 16
    targetSdkVersion 23
    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:23.1.0'
compile 'com.android.support:design:23.1.0'
}

Above changes + Build >> Clean Project.

Hope that helps!

这篇关于无法解析:com.android.support:appcompat-v7.15的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 00:19