Gradle Sync Failed to resolve: exifinterface - myhexaville smart image picker - java

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

Related

How I can use MapMyIndia in kotlin?

I can't use MapMyIndia in kotlin, I need to know how I can install it.
Now in my code I got this:
Project level build.gradle
maven {
url 'https://maven.mapmyindia.com/repository/mapmyindia/'
}
App level dependency build.gradle
implementation 'com.mapmyindia.sdk:mapmyindia-android-sdk:6.8.2'
But when I want to use anything with MapMyIndia on my activity or xml I got none about it.
There is one more place where you should import the.
in settings.gradle Project Settings and
should look something like this
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://maven.mapmyindia.com/repository/mapmyindia/' }
}
}
rootProject.name = "This is Sparta"
include ':app'
That should do the trick.

Is Jitpack needed as repository if I am using mavenCentral()?

So I am working on an old project in which I have the following code in the project build.gradle:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.google.gms:google-services:4.3.13'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Android Studio is warning me to use mavenCentral() instead of jcenter() as jcenter is not being updated. So I have change it to the following code:
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.google.gms:google-services:4.3.13'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
So my question is, if now I am using mavenCentral() instead of jcenter(), do I have to use the " maven { url "https://jitpack.io" }" line of code or I should´t use it? I mean, the correct code
would be the following instead of the previous code? ->
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.google.gms:google-services:4.3.13'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Or actually I should use the code line of maven jitpack (maven { url "https://jitpack.io" }") although now I am using mavenCentral() instead of jcenter()?
Or actually I should use the code line of maven jitpack (maven { url "https://jitpack.io" }") although now I am using mavenCentral() instead of jcenter()?
The choice of mavenCentral() versus jcenter() has nothing to do with jitpack.io and whether you should be using it as a repository.
You need a repository to obtain artifacts hosted by that repository. So, for example, you need the google() repository for most of Google's artifacts, such as the com.google.gms:google-services that you are using.
Whether you need jitpack.io will depend on whether you have any dependencies that come from that repository. We have no way of telling whether you do or you do not.
A comment on your question suggests removing it and seeing if your build breaks. That will not work immediately, as Gradle caches downloaded artifacts and usually works off of your cached copy. Your build would break in the future if you try updating the version of some dependency and none of the other repositories host that artifact (at least for that version).
The safest thing to do is to go through all your dependencies (everything listed in a dependencies closure in your project-level and module-level build.gradle files) and identify where they come from. Perhaps add comments to your Gradle files to help you keep track. If you find that none of your dependencies seem to come from jitpack.io, you can remove that repository.

Could not find com.android.tools.build:gradle:7.0.3

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

ERROR: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8

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

Could not find com.android.tools.build:aapt2 AndroidStudio

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.

Categories