I have used a new update of my coworker. and he changed the build.gradle file. But my IDE keeps telling me: Gradle sync failed: Could not find bundletool.jar (com.android.tools.build:bundletool:0.1.0-alpha01). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.jar
and here is my gradle file
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
jcenter()
google()
mavenCentral()
}
buildscript {
repositories {
jcenter()
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'io.fabric.tools:gradle:1.+'
}
}
allprojects {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
I have tried Setting -> Gradle -> Use default gradle wrapper and unmark Offline work
In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.
Then open Android Studio and go to File > Settings > Build, Execution and Deployment > Gradle > Use Gradle from > Set the path of the downloaded Gradle. Step 4. Now try syncing the Gradle again and check if the error still persists.
The fix is to put google()
above jcenter()
in your repository list in gradle
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With