2

After installing Android 3.1.3, the final part of the work in Gralde is faced with the following error?

Error in Configure Build Gradle

build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.adel.myapplication2"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

build.gradl(project)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

I noticed that there is no need for files in jcenter () For example, this path does not exist at site !!! Could not GET 'https://jcenter.bintray.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom' What should I do?

  • Was this working before? What is the URL you are using for the `jcenter()` repository? – entpnerd Jun 10 '18 at 05:41
  • The default settings are Android Studio and I did not change the repository. – user3060502 Jun 10 '18 at 05:43
  • I also created PATH and JAVA_HOME and GRADLE_HOME default paths, but it does not seem to be a problem with these sections! – user3060502 Jun 10 '18 at 05:47
  • Try what this answer to a similar question suggests: https://stackoverflow.com/a/35243768/4851565 – entpnerd Jun 10 '18 at 05:57
  • I tried, but still it's not possible to fix it !! The end section does not work on downloading gradle-3.1.2.jar and gradle-3.1.2.pom files !! Is it possible to separate the files in its path? Where is the path to which these files should be placed? – user3060502 Jun 13 '18 at 15:11
  • please upload your grade script and full stack trace. – entpnerd Jun 13 '18 at 15:12
  • I noticed that there is no need for files in jcenter () For example, this path does not exist at site !!! Could not GET 'https://jcenter.bintray.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom' What should I do? – user3060502 Jun 14 '18 at 09:02
  • 1
    you can try this https://stackoverflow.com/questions/18443208/androidstudio-gradle-proxy – Pratik Jun 14 '18 at 09:45
  • Thank you The answer worked in the following link :) [Answer](https://stackoverflow.com/questions/18443208/androidstudio-gradle-proxy/26840246#26840246) – user3060502 Jun 18 '18 at 13:57

0 Answers0