I have an android project that I developed it using android studio 2.3 after that I update the android studio to 3.3 and open the this project with new version but got many errors solve a lot of them but have new errors so this is my app build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "27.0.3"
defaultConfig {
applicationId ""
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
aaptOptions {
cruncherEnabled = false
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.roughike:bottom-bar:2.0.2'
implementation 'com.android.support:palette-v7:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.android.exoplayer:exoplayer:r2.3.1'
testImplementation 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.android.support:support-core-utils:26.1.0'
}
and this is my project build.gradle:
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha02'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and this is my gradle-wrapper-properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
and this is the errors I get:
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.
Open File
Show Details
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:design:26.1.0.
Open File
Show Details
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:cardview-v7:26.1.0.
Open File
Show Details
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:recyclerview-v7:26.1.0.
Open File
Show Details
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.roughike:bottom-bar:2.0.2.
Open File
Show Details
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:palette-v7:26.1.0.
Open File
Show Details
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:support-v4:26.1.0.
Open File
Show Details
............ etc.
I'm trying to change the 26.0.1 for all dependencies and target sdk from 26 to 27 and 27.1.1 and I got the same errors
I already use proxy so this is my gradle.properties:
systemProp.http.proxyHost=ip
systemProp.http.proxyPort=port
systemProp.http.proxyUser=user
systemProp.http.proxyPassword=pass
systemProp.https.proxyHost=ip
systemProp.https.proxyPort=port
systemProp.https.proxyUser=user
systemProp.https.proxyPassword=pass
and st it from setting > HTTP proxy by use the manual proxy configuration
and when I add the google() to gradle the errors changed to :
Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not determine artifacts for com.android.support:support-core-utils:27.1.1
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/support-core-utils/27.1.1/support-core-utils-27.1.1.aar'.
Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/support/support-core-utils/27.1.1/support-core-utils-27.1.1.aar'. Received status code 407 from server: Proxy Authentication Required
so I just delete google() what's the problem?