I have a project and I have the apk, but I have changed a value in the calculate.java file and I want to rebuild the project. But the following error appears. What should I do? I am not an android studio developer and I am only a novice.
"
Could not find com.android.tools.build:gradle:7.0.3.
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.0.3/gradle-7.0.3.pom
https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.0.3/gradle-7.0.3.pom
Required by:
project :
Add google Maven repository and sync project
Open File
"
Make sure that your build.gradle file contains Google's Maven repository:
buildscript {
repositories {
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
}
}
allprojects {
repositories {
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
...
}
Just Add mavenCentral() to build.gradle
Related
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find colorpicker-0.0.13.aar (com.github.QuadFlask:colorpicker:0.0.13).
Searched in the following locations:
https://jitpack.io/com/github/QuadFlask/colorpicker/0.0.13/colorpicker-0.0.13.aar
Possible solution:
Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
build.gradle (app)
allprojects {
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
implementation 'com.github.QuadFlask:colorpicker:0.0.13'
}
Add following in your top level build.gradle file
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
And then add following dependency in app level dependencies
dependencies {
implementation 'com.github.QuadFlask:colorpicker:0.0.15'
}
I have problem with build project in android-studio from https://github.com/Samsung/microbit.
I imported repository by git, but while build gradle project from in android-studio I have error:
ERROR: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.71.
I am not sure how I can change version 1.2.72 to other version.
Edit:
Solution:
I added mavenCentral() to
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
google()
}
}
I think there is no need to use that as you can use kotlin-stdlib directly.
Try this:
In your app level build.gradle file, under dependencies section:
dependencies{
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.41"
}
I want to install gradle 5.5.1 (from local) on Android Studio 3.4.2, for this download grandle gradle-5.5.1-all.zip and on the "gradle-wrapper.properties" file change this:
distributionUrl=file:///E:/Downloads/gradle-5.5.1-all.zip
and on "build.gradle":
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:5.5.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
but when want to make the project I have get this error:
ERROR: Could not find com.android.tools.build:gradle:5.5.1.
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/5.5.1/gradle-5.5.1.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/5.5.1/gradle-5.5.1.jar
- https://jcenter.bintray.com/com/android/tools/build/gradle/5.5.1/gradle-5.5.1.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/5.5.1/gradle-5.5.1.jar
Required by:
project :
Open File
But there is no file at these URLs, whats wrong?
just replace this wrongful line:
classpath 'com.android.tools.build:gradle:5.5.1'
with a version of build-tools, which actually exists:
classpath 'com.android.tools.build:gradle:3.4.2'
I got this error when I used this dependency 'com.myhexaville:smart-image-picker:1.0.3'
When i commented this dependency, gradle synced successfully.
Please suggest me a proper solution for this problem.
Add Google's Maven repository to your project's build.gradle file :
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
If you are using android-studio 3.0 or above use this :
allprojects {
repositories {
jcenter()
google()
}
}
getting this error when trying to Build my empty libgdx android studio project ..
Could not find com.android.tools.build:aapt2:3.2.0-alpha16-4748712.
Searched in the following locations:
file:/C:/Users/Noor~.~/android-sdks/extras/m2repository/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712.pom
file:/C:/Users/Noor~.~/android-sdks/extras/m2repository/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712-windows.jar
file:/C:/Users/Noor~.~/android-sdks/extras/google/m2repository/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712.pom
file:/C:/Users/Noor~.~/android-sdks/extras/google/m2repository/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712-windows.jar
file:/C:/Users/Noor~.~/android-sdks/extras/android/m2repository/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712.pom
file:/C:/Users/Noor~.~/android-sdks/extras/android/m2repository/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712-windows.jar
file:/C:/Users/Noor~.~/.m2/repository/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712.pom
file:/C:/Users/Noor~.~/.m2/repository/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712-windows.jar
https://repo.maven.apache.org/maven2/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712.pom
https://repo.maven.apache.org/maven2/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712-windows.jar
https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712.pom
https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712-windows.jar
https://oss.sonatype.org/content/repositories/releases/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712.pom
https://oss.sonatype.org/content/repositories/releases/com/android/tools/build/aapt2/3.2.0-alpha16-4748712/aapt2-3.2.0-alpha16-4748712-windows.jar
Required by:
project :android
You're missing the repositories dependency on Google Maven. You need to edit your main build.gradle file to contain:
buildscript {
repositories {
google() //This!
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha16'
}
}
allprojects {
repositories {
google() // And this!
jcenter()
}
}
So apparently changing the Gradle version fixed the problem for me. The Gradle version that is working is 3.1.3 but I'm not sure why that worked or if it will work for everyone.