This error only happening in android studio 3.5. I don't know why because I have used this same library in my other projects but after upgrading to the latest android studio which is 3.5, I am having this issue. I have checked and tried some answers but I was unable to solve it.
The error:
ERROR: Failed to resolve: com.github.hatamiarash7:RTL-Toast:1.3
Show in Project Structure dialog
Affected Modules: app
The library:
implementation 'com.github.hatamiarash7:RTL-Toast:1.3'
My apps dependencies section:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.+'
implementation 'com.android.support:design:28.+'
implementation 'com.android.support:cardview-v7:28.+'
implementation 'com.android.support:recyclerview-v7:28.+'
// circle image view
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.github.hatamiarash7:RTL-Toast:1.3'
implementation 'androidx.appcompat:appcompat:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
You must define JitPack in your root build.gradle:
allprojects {
repositories {
...
maven {
url 'https://jitpack.io'
}
}
}
and you will use this dependency:
implementation 'com.github.hatamiarash7:RTL-Toast:1.3'
Related
I tried to sync my project in android studio with gradle files but it failed and I got the above message "Grade sync failed: Unresolved dependencies".
I also got these errors in the build tab:
ERROR: Unable to resolve dependency for ':app#debugUnitTest/compileClasspath': Could not resolve androidx.fragment:fragment:[1.2.0].
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app#debugAndroidTest/compileClasspath': Could not resolve androidx.fragment:fragment:[1.2.0].
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve androidx.fragment:fragment:[1.2.0].
Show Details
Affected Modules: app
These are my dependencies in build.gradle (Module:app)
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.2.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
Hey I am not very much sure of this I didn't find any dependency for fragment
dependencies {
def fragment_version = "1.2.4"
// Java language implementation
implementation "androidx.fragment:fragment:$fragment_version"
// Kotlin
implementation "androidx.fragment:fragment-ktx:$fragment_version"
// Testing Fragments in Isolation
implementation "androidx.fragment:fragment-testing:$fragment_version"
}
Put this in the dependencies section
I wanted to use the class LostLocationEngine in the package com.mapbox.services.android.location shown in this Mapbox documentation, however I get the error Cannot resolve symbol 'services'. Is it something with my gradle?
Here are my repositories and dependencies, and let me know if you need any other information:
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.2.1'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-places-v8:0.9.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}
Thanks!
add this dependency to your build.gradle
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.11.0'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.8.0'
reference link https://docs.mapbox.com/android/plugins/overview/location-layer/
There are some problems with my build.gradle file of my Android Studio Project, I'm unable to resolve it.
Whenever i build project following errors occur:
ERROR: Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app#debugAndroidTest/compileClasspath': Could not resolve com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app#debugUnitTest/compileClasspath': Could not resolve com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0.
Show Details
Affected Modules: app
Here's dependecies section of my build.gradle
dependencies {
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0'
implementation "com.android.support:cardview-v7:${androidSupportLibraryVersion}"
implementation "com.android.support:recyclerview-v7:${androidSupportLibraryVersion}"
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.android.billingclient:billing:1.2.2'
}
project level build.gradle
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
}
}
use implementation 'com.github.AnchorFreePartner:hydra-sdk-android:2.3.0'
instead of
implementation 'com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0'
link
I'm implementing Parse SDK 1.20.0 on my kotlin android application, but whenever I implemented it and sync the gradle, I got a gradle incompatibility issue on appcompat-v7:28.0.0.
This is for kotlin application that connected with Parse SDK made by using Android Studio 3.4. in the past, I've tried to change the appcompat to smaller version and seem to end up having a gradle incompatibility.
the code on build.gradle (Module:app) :
Image For The Real Codes
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//Parse SDK implementation
implementation "com.github.parse-community.Parse-SDK-Android:parse:1.20.0"
implementation "com.github.parse-community.Parse-SDK-Android:ktx:1.20.0"
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}
i expected the gradle will have a compatibility, but the result always show the incompatibility.
i tried all possible methods and it still did not sync please help. Below is my whole gradle file, i have tried to merge the firebase core and messaging but it still shows the error
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'com.google.firebase:firebase-storage:16.0.4'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.firebaseui:firebase-ui-database:1.1.1'
implementation 'id.zelory:compressor:2.1.0'
implementation 'com.squareup.okhttp:okhttp:2.5.0'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.arturogutierrez:badges:1.0.5#aar'
implementation 'com.github.broakenmedia:CharCountTextView:v1.0'
implementation 'com.github.broakenmedia:MultiContactPicker:1.8.3'
implementation 'com.github.lguipeng:BubbleView:1.0.1'
implementation 'com.rockerhieu.emojicon:library:1.3.3'
implementation 'com.android.support:cardview-v7:27.1.1'
}
apply plugin: 'com.google.gms.google-services'
Below is the error message
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 16.0.4.
In your project build.gradle file, replace with below line:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
compile 'com.google.gms:google-services:4.2.0'//the latest version is 4.2.0
}
}
You are using different versions of firebase dependencies. That may be the reason for the failure. Update the google-services to latest version and use same version for firebase dependencies..
// as you can see different versions for firebase dependecies
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-database:16.0.4'
Either use 16.0.4 or the latest version of firebase dependencies.