0

android studio 3.0 error

Error:Could not resolve all files for configuration ':app:debugCompileClasspath'.

Could not resolve com.android.support:appcompat-v7:26.1.0. Required by: project :app Could not resolve com.android.support:appcompat-v7:26.1.0. Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom'. Could not GET 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom'. Connect to dl.google.com:443 [dl.google.com/172.217.17.110] failed: Connection timed out: connect Could not resolve com.android.support:appcompat-v7:26.1.0. Could not get resource 'https://jcenter.bintray.com/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom'. Could not GET 'https://jcenter.bintray.com/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom'. Connect to jcenter.bintray.com:443 [jcenter.bintray.com/159.122.18.156] failed: Connection timed out: connect

Goku
  • 9,102
  • 8
  • 50
  • 81
abdo 20122
  • 121
  • 2
  • 3
  • 4

2 Answers2

3

i was also facing this issue. place 'jcenter()' below the maven as shown below in project level gradle

allprojects {
repositories {
    maven { url 'https://maven.google.com' }
    jcenter()
}
Arjun
  • 358
  • 2
  • 13
1

This type of error occurs when there is a problem in version you compiled.

Go to your app level gradle.

Then find compile / dependencies section .

Replace

implementation 'com.android.support.appcompat_v7 ........'

With

implementation 'com.android.support.appcompat_v7:26.+'

There are many possible causes of error. Since you have provided very limited information, this might work

  • this is my build gradel ////// apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion "26.0.2" defaultConfig { applicationId "com.example.bok.myapplication" minSdkVersion 15 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } – abdo 20122 Nov 22 '17 at 08:06
  • buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } – abdo 20122 Nov 22 '17 at 08:08
  • dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' } – abdo 20122 Nov 22 '17 at 08:08
  • @abdo20122 did you try? If it worked say something so that others with similar problem can see later. – Ashutosh Chapagain Nov 22 '17 at 10:54