Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib - android

help me please. I had some issue with my project.
I got error like this
ERROR: Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib:1.4-M1-eap-93
ERROR: Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib-common:1.4-M1-eap-93
in my dependencies gradle module, I write this code
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
this is my buildscript
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.70'
repositories {
maven {
url "http://dl.bintray.com/kotlin/kotlin-eap"
}
maven { url 'https://maven.fabric.io/public' }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.0'
classpath 'io.fabric.tools:gradle:1.31.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply from: 'dependecies.gradle'
allprojects {
repositories {
maven {
url "http://dl.bintray.com/kotlin/kotlin-eap"
}
maven { url 'https://maven.fabric.io/public' }
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven {
url "http://dl.bintray.com/glomadrian/maven"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I using kotlin version 1.3.70 and IDE android studio version 3.5.1

change ext.kotlin_version = '1.3.70' to ext.kotlin_version = '1.4-M1'

Related

Could not resolve com.android.tools.build:gradle:3.0.1 ;

I m using this in gradle-properties:
**distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-
all.zip**
The build.gradle:
**buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
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()
maven {
url 'https://maven.google.com'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}**
I having this ERROR:
**failed org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':classpath'.
org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:3.0.1.
org.gradle.api.resources.ResourceException: Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom'.
org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0`enter code here`.1.pom'.
org.apache.http.conn.HttpHostConnectException: Connect to dl.google.com:443 [dl.google.com/172.217.160.238] failed: Connection timed out: connect
java.net.ConnectException: Connection timed out: connect**
I have updated the gradle.properties with gradle 5.6.4:
**distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-
5.6.4-all.zip**
And I have added maven { url "https://jitpack.io" } in gradle repositories:
**buildscript {
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
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()
maven {
url 'https://maven.google.com'
}
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}**
I have set the proxies and set it but the problem persisted.
Do try to use distribution url as:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
and in build.gradle :project:
buildscript {
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://jitpack.io" } // add this line.
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
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()
maven {
url 'https://maven.google.com'
}
maven { url "https://jitpack.io" } // add this line.
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
You need to add maven { url "https://jitpack.io" } // add this line.
in project build.gragle In order to resolve this issue.

Could not find method maven() for arguments [build_48jju0eu9q7aafln0yi713a7l$_run_closure1$_closure4#3cb5a1fe]

My build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.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
}
**My error code is
Could not find method maven() for arguments [build_48jju0eu9q7aafln0yi713a7l$_run_closure1$_closure4#3cb5a1fe] on root project 'androidtest2' of type org.gradle.api.Project.**
and
https://github.com/ujink/Android-HC06-Arduino
this program
Move the maven block inside the repositories block:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}

how to fix " Could not find com.android.tools.build:gradle:3.4.1

I'm new in react native, when i wanted to run my first project, i got this error,
how to fix it, thanks for your attentions
" Could not find com.android.tools.build:gradle:3.4.1.
Searched in the following locations:
this and this
project/buil.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven {
url 'https://dl.google.com/dl/android/maven2'
}
jcenter()
mavenCentral()
//apply plugin: 'jetty'
apply plugin: 'maven'
google()
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build.jetifier:jetifier-core:1.0.0-beta04'
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta04'
// 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
//}

i have problem in generating release apk i get AAPT error

java.util.concurrent.ExecutionException:com.android.builder.internal.aapt.v2.Aapt2Exception:AAPT error: check logs for details.
how to solved it*
Mostly it occurs with classpath. Try to check gradle classpath
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
Add your build.gradle file
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha18'
}
}
allprojects {
repositories {
google() // important!
jcenter()
}
}

android studio is not building my app after upgrade in studio 3.0 canery7

My Android studio is not building my apps after upgrade in studio 3 canery 7
this also not buliding previous projects .
this is my gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
allprojects {
repositories {
jcenter()
}
}
this is a build gradle version problem .
change the project level build file
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
to
dependencies {
// classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:3.0.0-alpha6'
}
and add repositories
repositories {
jcenter()
google()
}
final your build file like:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
// classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:3.0.0-alpha6'
}
}
allprojects {
repositories {
jcenter()
}
}
add this: On your build gradle
buildscript {
repositories {
maven {
url 'https://maven.google.com'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha4'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Categories

Resources