0

I have an older Gradle/Ionic project, and I can't build it.

I have this build.gradle configuration:

buildscript {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
    dependencies {

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
}

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

I receive this error:

A problem occurred configuring project ':CordovaLib'.

Could not resolve all files for configuration ':CordovaLib:classpath'. Could not find com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3. Searched in the following locations: https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.jar https://maven.google.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom https://maven.google.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.jar Required by: project :CordovaLib

After change to:

buildscript {
    repositories {
        maven {
            url "https://repo.grails.org/grails/core"
        }
        jcenter()
    }
    dependencies {

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
}

allprojects {
    repositories {
        maven {
            url "https://repo.grails.org/grails/core"
        }
        jcenter()
    }

I receive this error:

Could not resolve all files for configuration ':classpath'. Could not find com.android.tools.build:gradle:3.0.1. Searched in the following locations: https://repo.grails.org/grails/core/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom https://repo.grails.org/grails/core/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar

After change to:

buildscript {
    repositories {
        maven {
            url "https://repo.grails.org/grails/core"
        }
        google()
    }
    dependencies {

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
}

allprojects {
    repositories {
        maven {
            url "https://repo.grails.org/grails/core"
        }
        google()
    }

I receive this error:

Could not find com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3. Searched in the following locations: https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.jar https://maven.google.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom https://maven.google.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.jar

I know the problem is in repositories URLs, but I tried a lot of combinations, but without success. Can you help me please?

3
  • Does any of the configuration listed here (plugins.gradle.org/plugin/com.jfrog.bintray/1.7.3) help? Commented Sep 30, 2024 at 18:10
  • Hello, yes I tried this configuration. It works for com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3 error, but when I set the configuration for: maven {url "plugins.gradle.org/m2"} jcenter() I receive error with com.android.tools.build:gradle:3.0.1. When I set it for: maven {url "plugins.gradle.org/m2"} google() Than com.android.tools.build:gradle:3.0.1 is OK, but I receive error for com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3. It's like a vicious circle. Commented Oct 1, 2024 at 7:16
  • I think maybe you need both? Commented Oct 1, 2024 at 7:56

1 Answer 1

0

in path \platforms\android\CordovaLib\build.gradle

update according to below code

buildscript {
    repositories {
             google()

            //add below 3 line   
             mavenCentral()
             maven { url 'https://plugins.gradle.org/m2/' }
             maven { url 'https://groovy.jfrog.io/artifactory/libs-release/' }
            
             jcenter()
    }

    dependencies {
        // The gradle plugin and the maven plugin have to be updated after each version of Android
        // studio comes out
        classpath 'com.android.tools.build:gradle:3.3.0'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
    }
}

allprojects {
    repositories {
             google()
             
            //add below 3 line   
             mavenCentral()
             maven { url 'https://plugins.gradle.org/m2/' }
             maven { url 'https://groovy.jfrog.io/artifactory/libs-release/' }
            
             jcenter()
    }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.