错误:(39、13)无法解决:com.android.support:appcompat-v7:26.0.0 [英] Error:(39, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.0

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

问题描述

我正在使用Android Studio 2.3和Thought支持我的应用程序中支持新的android 26.我的gradle文件如下所示

I am using Android studio 2.3 and Thought for support new android 26 in my app.But I am stuck on error with title message. My gradle file is like below

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"



    defaultConfig {
        applicationId "com.example.shayari"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"

        manifestPlaceholders = [onesignal_app_id               : "",
                                // Project number pulled from dashboard, local value is ignored.
                                onesignal_google_project_number: "REMOTE"]

        vectorDrawables.useSupportLibrary = true
    }



    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    compile 'com.google.android.gms:play-services-location:10.2.6'
    compile 'com.android.support:support-v4:26.0.0'
    compile 'com.google.android.gms:play-services-gcm:10.2.6'
    compile 'com.google.android.gms:play-services-ads:10.2.6'
    compile 'com.android.support:appcompat-v7:26.0.0'
    compile 'com.android.support:preference-v7:26.0.0'
    compile 'com.android.support:design:26.0.0'
    compile 'com.android.support:cardview-v7:26.0.0'
    compile 'com.squareup.okhttp:okhttp:2.3.0'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.android.support:customtabs:26.0.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta3'
    compile 'com.onesignal:OneSignal:[3.5.3,4.0.0)'
    compile 'com.codemybrainsout.rating:ratingdialog:1.0.7'
    compile 'com.android.support:support-vector-drawable:26.0.0'
    compile 'com.google.android.gms:play-services-auth:10.2.6'
    compile 'de.hdodenhof:circleimageview:2.1.0'
}
repositories {
    jcenter()
    flatDir {
        dirs 'libs'
    }
}

但是我无法安装支持库,并出现以下错误.

But I am not able to install support repository with below error..

Error:(39, 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/MAITRII/Desktop/newhindi/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

推荐答案

将此添加到您的项目级别build.gradle文件:

Add this to your project level build.gradle file:

repositories {
    maven {
        url "https://maven.google.com"
    }
}

这篇关于错误:(39、13)无法解决:com.android.support:appcompat-v7:26.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆