Could not find com.android.tools.build:gradle:3.6.0-rc01 - android

when I tried to begin my first Android project, I got this a problem with this message
[A problem occurred configuring root project 'My Application'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find com.android.tools.build:gradle:3.6.0-rc01.]1
this is my build.gradle file
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.0-rc01'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I have downloaded the latest gradle version 6.4.1.
I also tried to change the repositories to all the following:-
-repositories {
google()
jcenter()
}
-repositories {
google()
}
-repositories {
google()
mavenCentral()
jcenter()
}
None of them worked
I am using a Psiphon Vpn (I'm not sure if it's related)
i'm using intellj IDEA 2020.1.1
and I'm using Gradle 6.4.1
I've used android studio 3.6.3 but it did work either.
I hope you can help me

Use classpath 'com.android.tools.build:gradle:3.6.3'

Related

Android Studio building issues - Could not resolve all artifacts for configuration

While building android app, Attached the issue i’m facing. Could not resolve all artifacts for configuration
Below is the project level gradle file i'm using.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
}
}
allprojects {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I tried with gradle build tools versions(4.0.2, 4.1.0), still getting the same issue. 'Could not resolve all artifacts for configuration'
I’m using
Android Studio 4.1.2, working on always on VPN in windows machine, Before this(always on VPN) it used to work for me. Somehow this is not working now. Could some one help me one this.
you need to add this :
buildscript {
ext.kotlin_version = '1.4.10'
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

Could not find com.android.tools.build:gradle:3.0.1. project from Github

I would like to open ten https://github.com/mukundmadhav/Wordpress-to-Android-app project in Android Studio. However, I have a problem.
I'm getting errors
ERROR: Could not find com.android.tools.build:gradle:3.0.1.
Searched in the following locations:
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
Required by:
project :
Add Google Maven repository and sync project
Open File
I tried to solve the problem with these methods
Gradle 4.1 issue on latest android studio 3.0.1
Could not find com.android.tools.build:gradle:3.0.1
Could not find com.android.tools.build.gradle:3.0.0-alpha7
However, nothing helped, does anyone know how to open this project?
Update:
Android Version 3.4.1
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
There should be google() repo in repositories which searches plugins/libraries in google repository.
Also, version number for com.android.tools.build should match the Android Studio Version. For example: for Android studio 3.4.1, classpath dependency should be:
classpath 'com.android.tools.build:gradle:3.4.1'
Here is the modified code for build.gradle.
// 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.4.1'
classpath 'com.google.gms:google-services:4.2.0'
// 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
}
Check if google() is present in repositories in the top level build.gradle
allprojects {
repositories {
jcenter()
google()
}
}
P.S - If you're using Android Studio 3.1 or higher, you should be able to click on Add Google Maven repository and sync project and allow Android Studio to make the necessary corrections by itself and resync the gradle.

Could not find com.android.tools.build:gradle-experimental:3.4.0 in android studio

my build.gradle is
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://maven.google.com/"
}
}
dependencies {
//classpath 'com.android.tools.build:gradle:2.1.2'
// classpath 'com.android.tools.build:gradle-experimental:0.7.2'
classpath 'com.android.tools.build:gradle:3.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
repositories {
mavenCentral()
mavenLocal()
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven {
url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and Sync error occurs like below
ERROR: Could not find com.android.tools.build:gradle-experimental:3.4.0.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle-experimental/3.4.0/gradle-experimental-3.4.0.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle-experimental/3.4.0/gradle-experimental-3.4.0.jar
- https://jcenter.bintray.com/com/android/tools/build/gradle-experimental/3.4.0/gradle-experimental-3.4.0.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle-experimental/3.4.0/gradle-experimental-3.4.0.jar
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-experimental/3.4.0/gradle-experimental-3.4.0.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-experimental/3.4.0/gradle-experimental-3.4.0.jar
Required by:
project :app
all classpath is doesn't work
how can I fix it?
You probably need to change the "distributionURL" in gradle-wrapper.properties.
In this page you can see, which gradle version you need.
In your example, I think, this will be the "distributionURL":
distributionUrl = https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
Because Gradle and the Android plugin run independently from Android Studio, you need to update the build tools separately. Hope this helps... Here is a link to a how to vid. https://www.google.com/search?rlz=1C1GCEA_enNA829NA829&ei=zd7dXOybJ9Hhgwef9KHAAg&q=update+gradle+in+android+studio&oq=update+gra+in+android+studio&gs_l=psy-ab.1.0.0i7i30j0i7i5i30.96964.99326..104851...0.0..0.327.3123.2-1j9......0....1..gws-wiz.......0i71.NTQ5itjULUs#kpvalbx=1
Add google() in your repositories list in build.gradle.
buildscript {
repositories {
jcenter()
google()
}

Android Studio 3.1 : Could not find org.jetbrains.trove4j:trove4j:20160824

Yesterday, I updated Android Studio to 3.1 and I'm getting this error :
Could not find org.jetbrains.trove4j:trove4j:20160824.
Searched in the following locations:
https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
https://dl.google.com/dl/android/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
https://dl.google.com/dl/android/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
Required by:
project :library > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.lint:lint:26.0.1 > com.android.tools.lint:lint-checks:26.0.1 > com.android.tools.lint:lint-api:26.0.1 > com.android.tools.external.com-intellij:intellij-core:26.0.1
This is my project's gradle file :
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// classpath 'com.google.gms:google-services:1.5.0-beta2'
classpath 'com.google.gms:google-services:3.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This is my gradle-wrapper-properties's distdistributionUrl:
distdistributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip
Try to replace all occurences of mavenCentral() with jcenter() in your gradle builds
Because jCenter will close in May, you should replace it with Maven. Thanks to giorgos.nl now we can add Trove4j:20160824. Thanks to Xavier Rubio Jansana we can replace maven { url 'https://plugins.gradle.org/m2/' } with gradlePluginPortal().
In root build.gradle write:
buildscript {
repositories {
google()
gradlePluginPortal()
}
}
allprojects {
repositories {
google()
mavenCentral()
// org.jetbrains.trove4j:trove4j:20160824.
gradlePluginPortal()
}
}
To add libraries that have not still been moved to mavenCentral, use this method.
Root build.gradle:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Then you should search GitHub repositories of not resolved libraries. App's build.gradle example with two libraries:
dependencies {
// When a library has tags.
implementation 'com.github.RedMadRobot:input-mask-android:6.0.0'
// When a library doesn't have tags.
implementation 'com.github.savvisingh:DateRangePicker:master'
}
Now we can launch an application and build apk without errors.
I had the same mistake ... and for me the following worked:
Add jcenter() to repositories {} of allprojects
And add compile 'org.jetbrains.trove4j: trove4j: 20160824' in the build.gradle app module
I had this same error. I also had jcentre() at the appropriate place. But still it was not working.
One thing you can do which worked for me is clear the caches:
1. Close Android Studio.
2. Clear caches in here:
C:\Users"username"\.android\caches
C:\Users"username"\.gradle\caches
3. Open Android Studio.
Also make sure you have the version of the gradle which is newer than the minimum required.

Android studio 3.0 - Cant run app

So far i only worked on the computer from my job and today im trying to setup my project on my home computer but no luck so far.
I guess it has to with gradle configurations or android studio 3.0 but the settings are the same for both computers, i get no errors but cant click the run button, adding run configuration doesnt work either.
My gradle:
buildscript {
repositories {
mavenCentral()
jcenter()
mavenLocal()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha6'
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()
mavenCentral()
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
maven { url 'http://github.com/wada811/Android-Material-Design-Colors/raw/master/repository/' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I dont know if this will help but my gradle.build is this for my apps. Maybe try using mine? Or an upgrade on your android studio, I know the earlier ones have bugs. The newer versions always seem to run more smoothly
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Categories

Resources