I am getting these errors while building the project
Failed to resolve: firebase-core
Failed to resolve: multidex
Failed to resolve: play-services-ads
Failed to resolve: play-services-auth
Failed to resolve: firebase-auth-license
Failed to resolve: common
Please check and let me know how this issue can be resolved?
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.test.android"
minSdkVersion 15
targetSdkVersion 26
versionCode 3
versionName "1.0.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "65f11821-8462-4ec4-9e41-XXXXXXXX",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "91629XXXXX00"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
implementation 'com.google.firebase:firebase-auth:11.6.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// applovin
implementation project(':unity-ads')
//unity ads
//compile 'com.google.android.gms:play-services-ads:11.0.4'
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support:design:26.+'
implementation 'com.android.support:support-vector-drawable:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.+'
implementation 'com.google.android.gms:play-services:11.6.0'
implementation 'com.android.support:multidex:1.0.1'
//compile 'com.github.cooltechworks:ScratchView:v1.1'//not used
implementation 'com.jackpocket:scratchoff:1.1.0'
implementation 'com.adcolony:sdk:3.2.1'
implementation 'com.android.support:support-annotations:26.0.1'
implementation 'com.google.android.gms:play-services-ads:11.6.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.facebook.android:facebook-share:[4,5)'
testImplementation 'junit:junit:4.12'
implementation 'com.ironsource.sdk:mediationsdk:6.7.0.1#jar'
//compile 'com.google.ads.mediation:unity:2.1.1.0' //not used
implementation 'com.google.firebase:firebase-database:11.6.0'
implementation 'com.github.bumptech.glide:glide:4.1.1'
implementation 'commons-net:commons-net:3.3'
//get server time
//compile 'com.github.instacart.truetime-android:library-extension-rx:2.0'
//compile 'com.github.instacart.truetime-android:library:2.0' // not used
implementation 'com.google.firebase:firebase-auth:11.6.0'
implementation 'com.google.firebase:firebase-core:11.6.0'
implementation 'com.google.android.gms:play-services-auth:11.6.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.onesignal:OneSignal:[3.7.1, 3.99.99]'
implementation files('libs/applovin-sdk-7.7.0-javadoc.jar')
implementation files('libs/applovin-sdk-7.7.0.jar')
}
apply plugin: 'com.google.gms.google-services'
// 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.2.0-alpha09'
classpath 'com.google.gms:google-services:3.1.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" }
maven { url "https://adcolony.bintray.com/AdColony" }
maven { url "https://dl.bintray.com/ironsource-mobile/android-sdk" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Apparently, jcenter has started mirroring Google's repo. Try moving google() before jcenter() in the allprojects section of your project's build.gradle (like this):
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
maven { url "https://adcolony.bintray.com/AdColony" }
maven { url "https://dl.bintray.com/ironsource-mobile/android-sdk" }
}
Have you tried rebuilding the app? Also make sure you are using the latest version of GMS. As a sidenote you dont need to add the entire gms library, you can add selective services. I see you have added gms- and gms-ads, which would already be included in the main gms.
Error:Failed to resolve: com.android.support:customtabs:26.0.1
Error:(44, 13) Failed to resolve: com.google.firebase:firebase-auth:11.0.4
build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "pritish.sawant.com.simplypubliccloud"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// FirebaseUI
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-config:11.0.4'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.16.0'
compile 'com.google.android.gms:play-services-auth:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
build.gradle(project)
// 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.3'
classpath 'com.google.gms:google-services:3.1.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 am using Firebase,Facebook libraries.I am getting the following errors.I tried everything.Please help me if you know how to resolve this error.I am also receiving the following error
Error:(41, 13) Failed to resolve: com.android.support:design:26.0.1
I tried clicking on Install Repository and sync project,but nothing happens.
Error:Failed to resolve: com.android.support:customtabs:26.0.1
Error:(41, 13) Failed to resolve: com.android.support:design:26.0.1
You should change your buildToolsVersion version .
Don't
buildToolsVersion "25.0.3"
Do
buildToolsVersion "26.0.1"
Then Clean-Rebuild-Run .
Add one more Dependency to your list.
compile 'com.google.firebase:firebase-core:11.0.4'
Then clean and rebuild your project.
Maybe you can try to change the repositories just as the demo instruction--->
buildscript {
repositories {
jcenter()
mavenLocal()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
mavenLocal()
google()
maven { url 'https://maven.fabric.io/public' }
}
}
I am trying to add the library into the Kotlin but it is not getting proper install in it.
Following error I am getting while importing the library, please check it
Error: Could not find com.android.tools.build:gradle:2.3.1.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio Preview/gradle/m2repository/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.pom
file:/C:/Program Files/Android/Android Studio Preview/gradle/m2repository/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.jar
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.jar
Required by:
project: slidingmenulib
I am using the following project build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.3-2'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha9'
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
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And my module build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.zargow.kotlin"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.0.0-beta2'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:recyclerview-v7:26.0.0-beta2'
compile 'com.github.bumptech.glide:glide:3.8.0'
compile 'org.jetbrains.anko:anko-design:0.8.3'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
compile 'com.android.support:cardview-v7:26.0.0-beta2'
compile 'com.android.support:design:26.0.0-beta2'
compile 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.android.support:design:26.0.0-beta2'
}
I am using the library for sliding menu, please check this. I need to import this library into my kotlin project but getting error.
In progect gradle file use
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "http://jzaccone.github.io/SlidingMenu-aar" }
}
}
and in app gradle add
dependencies {
....
compile 'com.jeremyfeinstein.slidingmenu:library:1.3#aar'
}
I can't compile my Android Kotlin project.
I have no idea what is this...
Gradle log:
error: supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class android.support.v7.app.AppCompatActivity, unresolved supertypes: SupportParentable
build.gradle (app)
buildscript {
ext.android_plugin_version = "2.3.3"
ext.kotlin_version = '1.1.2-5'
repositories {
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$android_plugin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
def compat_version = '26.+'
def play_services_version = '11.0.1'
def firebase_version = '9.6.1'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.site.app"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["library" : "true"]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
dataBinding {
enabled true
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
kapt {
generateStubs = true
correctErrorTypes = true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
// android
compile 'com.android.support:multidex:1.0.1'
compile "com.android.support:appcompat-v7:${compat_version}"
compile "com.android.support:design:${compat_version}"
compile "com.android.support:cardview-v7:${compat_version}"
compile "com.android.support:recyclerview-v7:${compat_version}"
compile "com.android.support:gridlayout-v7:${compat_version}"
compile "com.google.android.gms:play-services:${play_services_version}"
compile "com.google.android.gms:play-services-ads:${play_services_version}"
compile "com.google.android.gms:play-services-maps:${play_services_version}"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.maps.android:android-maps-utils:0.4+'
kapt "com.android.databinding:compiler:$android_plugin_version"
// kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
}
In my case I had a library module with an abstract application class implementing Dagger's HasActivityInjector and an application module with a dependency to the library and its own (non-abstract) application class extending the base app class.
My Gradle dependencies were implementations, and therefore not accessible to the application module's application class (even though there were no imports there, otherwise the issue would be immediately obvious as you'd get a 'could not resolve' error. The fix was to replace dagger implementation dependencies with api, that makes them available to dependant modules as well.
I fixed it by changing the order of plugins call!
build.gradle
buildscript {
ext.android_plugin_version = '2.3.3'
ext.kotlin_version = '1.1.3-2'
repositories {
jcenter()
mavenCentral()
maven { url "https://maven.google.com" }
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
dependencies {
classpath "com.android.tools.build:gradle:$android_plugin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
classpath 'io.fabric.tools:gradle:1.+'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url "https://maven.google.com" }
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
app/build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.sample.app"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
debug {
ext.alwaysUpdateBuildId = false
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
dataBinding {
enabled true
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
abortOnError false
disable 'InvalidPackage'
}
}
kapt {
generateStubs = true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
// kotlin
kapt "com.android.databinding:compiler:$android_plugin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
// android
compile 'com.android.support:multidex:1.0.1'
compile "com.android.support:appcompat-v7:${compat_version}"
compile "com.android.support:design:${compat_version}"
compile "com.android.support:cardview-v7:${compat_version}"
compile "com.android.support:recyclerview-v7:${compat_version}"
compile "com.android.support:gridlayout-v7:${compat_version}"
compile "com.android.support:support-vector-drawable:${compat_version}"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile "com.google.android.gms:play-services-ads:${play_services_version}"
compile "com.google.android.gms:play-services-maps:${play_services_version}"
compile "com.google.android.gms:play-services-gcm:${play_services_version}"
compile 'com.google.maps.android:android-maps-utils:0.4+'
// fabric
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
// logger
compile 'com.orhanobut:logger:2.1.1'
// dexter
compile 'com.karumi:dexter:4.1.0'
// firebase
compile "com.google.firebase:firebase-messaging:${firebase_version}"
// persistence
compile "android.arch.persistence.room:runtime:1.0.0-alpha3"
annotationProcessor "android.arch.persistence.room:compiler:1.0.0-alpha3"
// facebook
compile 'com.facebook.android:facebook-android-sdk:4.+'
// retrofit
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
// gson
compile 'com.google.code.gson:gson:2.8.1'
// jobs
compile 'com.evernote:android-job:1.1.11'
// chart
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
// fresco
compile 'com.facebook.fresco:fresco:1.3.0'
// indicator
compile 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
}
Before trying anything else, try:
Android Studio -> File -> Invalidate cache/restart
This worked for me.
For me the problem was child module not using AndroidX Activity. I guess the class names clashed.
Added this to resolve:
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
I solved my problem by deleting files related with dagger hilt from java(generated) and rebuild my project
(App)-----depends----(library)
In my case I did not change any dependencies configuration nor i change the order.
I had to copy a local pojo(model) jar file from the library module to App.
App is in kotlin
library is in java
Its a bug, I should not have pojo.jar in app and library
Clean Project and Rebuild it This works for me
Well in my case this error randomly occurs which usually occurs during execution through Android Studio.
The root cause was that My Activity class were extending some interfaces which was in another nested package:
package tv.activities
public class MainActivity implements MyListener {
}
package tv.activities.error
interface MyListener {
}
Hence it usually happens during execution but after second run it resolves automatically so no one bother to resolve it. Sometimes Android Studio fail to recognise that interface is accessible so there is no sense of showing error for the same:
Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class tv.activities.MainActivity, unresolved supertypes: MyListener
Final Solution:
Making interface public resolves this issue permanently.
public interface MyListener {
}
Or refactor the package accessibility where AS doesn't get confuse
Make sure to add same dependencies in the project level as well which are added to the module
On my case I had to add the required dependency on my main module and compile the last version with:
android {
configurations.all {
resolutionStrategy.force "com.squareup.picasso:picasso:${picassoVersion}"
}
}
I was getting error for below lib in app level build.gradle
implementation 'com.google.firebase:firebase-iid:20.0.2'
So the solution is the order in project level build.gradle, So
before solving error the structure was
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
After Solving the error the struture is :
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
maven {
url "https://maven.google.com"
}
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url "https://maven.google.com" // Google's Maven repository
}
google()
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
By default it tries to download using google() as it comes first in the sequence but when we move maven on top of all then it creates the build again using maven and the build succeeds. Cheers :)
When setting up the crashlytics to my app, I used "recommended" dependency as well, as shown below. But this was the part causes error.
// Firebase Crashlytics
// (Recommended) Add the Google Analytics dependency.
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
Removing "analytics" line solved my problem.
// Firebase Crashlytics
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
Hope this helps someone else too,
best
I fixed this error upgrading others libraries.
My error showed when I added firebase=ads (from google adsmob).
So I found a conflict in my firebase-auth (16.0.5) and firebase ads (19.0.1).
Migrating firebase to 19.3.0 solved the problem.
In my case, I had removed an unused OnFragmentInteractionListener in a fragment:
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
However, In my activity I had failed to remove a reference to this OnFragmentInteractionListener :
public class MainActivity extends AppCompatActivity implements
MyFragment.OnFragmentInteractionListener {
Strangely, instead of giving an error that indicated the OnFragmentInteractionListener was not found, I received the above "supertypes of the following classes cannot be resolved" with no reference to the classes.
In my case, I went to the project structure and updated all firebase dependencies to the latest and the highest. At the moment here are implementations with their versions:
implementation 'com.google.firebase:firebase-auth:19.3.1'
implementation 'com.google.firebase:firebase-database:19.3.1'
implementation 'com.google.firebase:firebase-storage:19.1.1'
implementation 'com.google.firebase:firebase-analytics:17.4.3'
I deleted my build folder and restarted the project
app/build
Update your google play gradle version to the latest
I want add this dependencies compile 'com.github.ar-android:DrawRouteMaps:1.0.0' into my Android studio Project.
When add this into dependencies and click on Sync show me this error :
Error:(39, 13) Failed to resolve: com.github.ar-android:DrawRouteMaps:1.0.0
Show in File<br>Show in Project Structure dialog
build.gradle codes:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.example.mohammadn.a1_maptutorial"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.google.android.gms:play-services:9.2.1'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.google.android.gms:play-services-maps:9.2.1'
testCompile 'junit:junit:4.12'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.google.code.gson:gson:2.6.1'
compile 'com.github.ar-android:DrawRouteMaps:1.0.0'
}
How can I fix it and add this library into my dependencies?
Add support jitpact repository in root build.gradle at the end of repositories:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
Read official guideline about DrawRouteMaps .
Add this to your project: build.gradle file to this
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
Try adding following lines to project/build.gradle (not app/build.gradle)
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
app/build.gradle
compile 'com.github.ar-android:DrawRouteMaps:1.0.0'
First, you have to add the Maven Repository in your project:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
And then, add dependencies in build.gradle module app :
dependencies {
compile 'com.github.ar-android:DrawRouteMaps:1.0.0'
}
In addition to above comments you can add dependencies in file->project structure-> add->+(plus sign)->add library