Reputation: 11
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?
Upvotes: 0
Views: 483
Reputation: 5272
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()
}
}
Upvotes: 0