your programing

': app @ debug / compileClasspath'에 대한 종속성을 해결할 수 없음 : com.android.support:appcompat-v7:26.1.0을 확인할 수 없습니다.

lovepro 2020. 10. 4. 12:55
반응형

': app @ debug / compileClasspath'에 대한 종속성을 해결할 수 없음 : com.android.support:appcompat-v7:26.1.0을 확인할 수 없습니다.


': app @ debug / compileClasspath'에 대한 종속성을 해결할 수 없음 : com.android.support:appcompat-v7:26.1.0을 확인할 수 없습니다.

com.android.support:appcompat-v7:26.1.0을 해결할 수 없습니다.

필요 : project : app

오프라인 모드에 사용할 수있는 com.android.support:appcompat-v7:26.1.0의 캐시 된 버전이 없습니다.

오류 기록:

구성 ': app : debugCompileClasspath'에 대한 모든 파일을 확인할 수 없습니다.
com.android.support:appcompat-v7:26.1.0을 해결할 수 없습니다.
필요 :
project : app
오프라인 모드에서 사용할 수있는 com.android.support:appcompat-v7:26.1.0의 캐시 된 버전이 없습니다.
오프라인 모드에 사용할 수있는 com.android.support:appcompat-v7:26.1.0의 캐시 된 버전이 없습니다.
com.android.support.constraint : constraint-layout : 1.1.0-beta3을 해결할 수 없습니다.
필요 :
project : app
오프라인 모드에 사용할 수있는 com.android.support.constraint : constraint-layout : 1.1.0-beta3의 캐시 된 버전이 없습니다.
오프라인 모드에 사용할 수있는 com.android.support.constraint : constraint-layout : 1.1.0-beta3의 캐시 된 버전이 없습니다.
com.android.support:design:26.1.0을 해결할 수 없습니다.
필요 :
project : app
오프라인 모드에서 사용할 수있는 com.android.support:design:26.1.0의 캐시 된 버전이 없습니다.
오프라인 모드에 사용할 수있는 com.android.support:design:26.1.0의 캐시 된 버전이 없습니다.
com.android.support:cardview-v7:26.1.0을 해결할 수 없습니다.
필요 :
project : app
오프라인 모드에서 사용할 수있는 com.android.support:cardview-v7:26.1.0의 캐시 된 버전이 없습니다.
오프라인 모드에서 사용할 수있는 com.android.support:cardview-v7:26.1.0의 캐시 된 버전이 없습니다.
com.google.android.gms : play-services-ads : 11.4.2를 해결할 수 없습니다.
필요 :
project : app
오프라인 모드에서 사용할 수있는 com.google.android.gms : play-services-ads : 11.4.2의 캐시 된 버전이 없습니다.
오프라인 모드에서 사용할 수있는 com.google.android.gms : play-services-ads : 11.4.2의 캐시 된 버전이 없습니다.
com.android.support:support-v4:26.1.0을 해결할 수 없습니다.
필요 :
project : app
오프라인 모드에 사용할 수있는 com.android.support:support-v4:26.1.0의 캐시 된 버전이 없습니다.
오프라인 모드에 사용할 수있는 com.android.support:support-v4:26.1.0의 캐시 된 버전이 없습니다.

오류 로그 이미지 :

이미지를 보려면 여기를 클릭하십시오


이동 File->Other Settings->Default Settings->Build, Execution, Deployment->Build Tools->Gradle->Uncheck Offline work option.


다음은의 해결 방법 데모 이미지입니다. 다음 Offline work으로 이동하여 옵션을 선택 취소하십시오 .

File-> Settings-> Build, Execution, Deployment->Gradle

여기에 이미지 설명 입력

위의 해결 방법이 작동하지 않으면 다음을 시도하십시오.

  1. build.gradle애플리케이션 파일을 엽니 다 .

  2. 저장소 섹션에 " https://maven.google.com "엔드 포인트가 있는 maven 섹션이 포함되어 있는지 확인하십시오 . 예를 들면 :

    allprojects {
         repositories {
             jcenter()
             maven {
                 url "https://maven.google.com"
             }
         }
    }
    
  3. dependencies섹션에 지원 라이브러리를 추가 하십시오. 예를 들어 v4 core-utils 라이브러리를 추가하려면 다음 줄을 추가합니다.

    dependencies {
        ...
        compile "com.android.support:support-core-utils:27.1.0"
    }
    

주의 : 동적 종속성 (예 :)을 사용 palette-v7:23.0.+하면 예기치 않은 버전 업데이트 및 회귀 비 호환성이 발생할 수 있습니다. 라이브러리 버전 (예 :)을 명시 적으로 지정하는 것이 좋습니다 palette-v7:27.1.0.

매니페스트 선언 변경

특히, 아래와 같이 매니페스트 android:minSdkVersion<uses-sdk>태그 요소를 새롭고 낮은 버전 번호로 업데이트해야 합니다.

<uses-sdk
  android:minSdkVersion="14"
  android:targetSdkVersion="23" />

Gradle 빌드 파일을 사용하는 경우 빌드 파일의 minSdkVersion설정이 매니페스트 설정을 재정의합니다.

apply plugin: 'com.android.application'

android {
   ...
      defaultConfig {
            minSdkVersion 16
            ...
        }
        ...
    }

Following Android Developer Library Support.


Just went to build.gradle and deleted the line:

implementation 'com.android.support:appcompat-v7:26.1.0'

After that, I re-synced the Gradle. Then, I pasted the line of code back, re-synced the Gradle again and it worked.

Note: While I was making this changes, I also updated all the SDK Tools that needed update.


Invalidate Cache / Restart from File option.

Just unchecking offline mode did not work for me.


use Invalidate Caches/Restart it will works for you and make sure that your gradle offline sync option is not enabled


Adding this in project gradle worked for me

allprojects {
 repositories {
     jcenter()
     maven {
         url "https://maven.google.com" // specifically this worked 
     }
 }}

Today I have the similar problem.

Previous in my project gradle

// Top-level build file where you can add configuration options common to all 
sub-projects/modules.
allprojects {
repositories {
    jcenter()
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
    maven { url 'https://plugins.gradle.org/m2/'}
}}

Then I just added this below line in allprojects

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

It saved my day.

And now my current allproject {} code looks like this

allprojects {
repositories {
    jcenter()
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
    maven { url 'https://plugins.gradle.org/m2/'}
    maven {
        url "https://maven.google.com"
    }
}}

From the documentations:

Add the support library to the dependencies section. For example, to add the v4 core-utils library, add the following lines:

dependencies {
    ...
    implementation "com.android.support:support-core-utils:28.0.0"
}

I solved the problem. In Home Ubuntu, I deleted the .gradle folder and downloaded it again. I hope it is useful


For users which have flavors in the project and found this thread:

Notice, that if your module dependency has different flavors, you should use one of the strategies:

  1. Module that tightens dependencies should have the same flavors and dimensions as the dependency module
  2. You should explicitly indicate which configuration you target in the module

Like that:

dependencies {
    compile project(path: ':module', configuration:'alphaDebug') 
}

I ran into the same issue and adding mavenCentral() in the repositories block of my build.gradle file worked for me. I had Offline work unchecked and adding maven { url "https://maven.google.com" }. Adding this answer for the lost souls that find themselves at end of this thread.


If you did not uncheck offline work, then make you sure you have internet for Android Studio to normalize your project.


If you are getting this same error after adding dynamic module then don't worry follow this:

  • Add productFlavors in your build.gradle(dynamic- module)

    productFlavors {
    flavorDimensions "default"
    stage {
       // to do
    }
    prod {
       // to do
    
     }
    }
    

For other people where the accepted answer does not solve this issue...

As of September 2018, AndroidX has replaced the Android Support Libraries, which includes the appcompat-v7 library.

'com.android.support:appcompat-v7' becomes 'androidx.appcompat:appcompat:1.0.0'

'com.android.support:design'은 'com.google.android.material : material : 1.0.0'이됩니다.

참조 :

https://developer.android.com/jetpack/androidx/migrate AndroidX 매핑에 대한 지원 라이브러리 목록

참고 URL : https://stackoverflow.com/questions/46999594/unable-to-resolve-dependency-for-appdebug-compileclasspath-could-not-resolv

반응형