Al actualizar AS 3.0 y el Gradle 4.6 me sale este error.
He intentado de todas las maneras. Instalación manual, SDk, limpiar cache, reconstruir, d3esde las dependencias, de forma manual en Configuración > Gradle > Ruta del directorio > Aceptar. luego Reiniciar Android Studio, etc, etc, etc y no logro sincronizarlo. He podido instalar la última versión disponible de gradle. (4.6) pero al tratar sincronizar el proyecto, no encuentra los archivos gradle.4.6.pom y gradle-4.6.jr en el directorio de proyectos. Lamentablemente no logro enconrtrarlos. Sinceramente, antes tenía el gradle 3.4 (un par de meses sin usar) y también me daba este mismo error. L a ñultima vez que funcionó todo ok, fue con la versión anterior de Android studio y el gradle 3.4. Alguna ayuda para ver luz en este problema?
Como dije. Según sistema la versión de Gradle 4.6 está instalada correctamente pero no sincroniza y no encuentra los archivos gradle-4.6.pom y gradle-4.6.jar.
Mi Build Gradle completo es este:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
// maven {
// url 'https://maven.google.com/'
// name 'Google'
// }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.6'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Y El error que sale al compilar En Build Gradle:
Information:Gradle tasks [clean, :app:generateDebugSources] Information:BUILD FAILED in 1s Error:FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'MeetMapp'.
Could not resolve all artifacts for configuration ':classpath'. Could not find com.android.tools.build:gradle:4.6. Searched in the following locations: file/miDISCO C/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/4.6/gradle-4.6.pom file/miDISCO C/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/4.6/gradle-4.6.jar WEB jcenter.bintray.com/com/android/tools/build/gradle/4.6/gradle-4.6.pom tambien en WEBjcenter.bintray.com/com/android/tools/build/gradle/4.6/gradle-4.6.jar wEBdl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.6/gradle-4.6.pom wEBdl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.6/gradle-4.6.jar Required by: project :
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at GRADLE
BUILD FAILED in 1s
Information:1 error Information:0 warnings Information:See complete output in console
Y el error en Event Log:
12:35 Executing tasks: [clean, :app:generateDebugSources]
12:35 Gradle build finished with 1 error(s) in 1s 964ms
12:35 Gradle sync started
12:35 Gradle sync failed: Cause: startup failed: build file mIpcC:\Users\MARCOS\AndroidStudioProjects\MeetMapp\build.gradle': 17: unexpected token: } @ line 17, column 1. } ^ 1 error Consult IDE log for more details (Help | Show Log) (1s 589ms)
12:35 Executing tasks: [clean, :app:assembleDebug]
12:35 Gradle build finished with 1 error(s) in 723ms
13:00 Executing tasks: [clean, :app:generateDebugSources]
13:00 Gradle build finished with 1 error(s) in 1s 3ms
13:00 Gradle sync started
13:00 Gradle sync failed: Cause: startup failed: build file miPCC\Users\MARCOS\AndroidStudioProjects\MeetMapp\build.gradle': 20: unexpected token: } @ line 20, column 1. } ^ 1 error Consult IDE log for more details (Help | Show Log) (1s 686ms)
13:00 Executing tasks: [clean, :app:assembleDebug]
13:00 Gradle build finished with 1 error(s) in 789ms
13:01 Executing tasks: [clean, :app:generateDebugSources]
13:01 Gradle build finished with 1 error(s) in 2s 649ms
13:01 Gradle sync started
13:01 Executing tasks: [clean, :app:assembleDebug]
13:01 Gradle sync failed: Could not find com.android.tools.build:gradle:4.6. Searched in the following locations: MiPC/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/4.6/gradle-4.6.pom MiPC/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/4.6/gradle-4.6.jar Webjcenter.bintray.com/com/android/tools/build/gradle/4.6/gradle-4.6.pom Webjcenter.bintray.com/com/android/tools/build/gradle/4.6/gradle-4.6.jar Webdl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.6/gradle-4.6.pom Webdl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.6/gradle-4.6.jar Required by: project : Consult IDE log for more details (Help | Show Log) (2s 700ms)
13:01 Gradle build finished with 1 error(s) in 14s 416ms
13:04 Executing tasks: [clean, :app:generateDebugSources]
13:04 Gradle build finished with 1 error(s) in 2s 506ms
13:05 Executing tasks: [clean, :app:generateDebugSources]
13:05 Gradle build finished with 1 error(s) in 1s 936ms
build.gradle
y el error