android studio terminal not install gradlew - android

im trying too use commad "gradlew install" in android studio 3.0 terminal but it fails and show errors. any one an help?
my gradle configuration at top level like this:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Did you follow the steps properly for setting up Bintray?
I think you have missed the below step
https://github.com/bintray/gradle-bintray-plugin#gradle--21
And one more problem in downloading gradle plug-in is, you haven't added maven url in buildscript -> repositories and allprojects -> repositories sections.
maven {
url 'https://maven.google.com'
}
I hope this information helps you.

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
}
}

cannot fix: Could not find kotlin-reflect-1.3.72.jar (org.jetbrains.kotlin:kotlin-reflect:1.3.72) [duplicate]

I want to update the Android Gradle plugin but Im getting this error:
ERROR: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.31.
Those are the lines I added to update the Android Gradle plugin (build.gradle file):
buildscript {
repositories {
// Gradle 4.1 and higher include support for Google's Maven repo using
// the google() method. And you need to include this repo to download
// Android Gradle plugin 3.0.0 or higher.
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
}
}
You are missing some repositories(jcenter) and some dependencies(kotlin-gradle-plugin). That's why Kotlin cannot be found.
Your build.gradle(Project:android) file should look something like this:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:3.4.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

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

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'

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.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