0

I have used firebase as a backend to my application and, as a consequence, I am using firebase auth with firebase UI for authentication but I'm facing an error:

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

    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:design:26.+'
    compile 'com.android.support:support-vector-drawable:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'

    // firebaes dependancies.
    compile 'com.firebaseui:firebase-ui-auth:2.1.1'
    compile 'com.google.firebase:firebase-core:11.0.2'
    compile 'com.google.firebase:firebase-database:11.0.2'
    compile 'com.google.firebase:firebase-auth:11.0.2'

        testCompile 'junit:junit:4.12'
    }

    apply plugin: 'com.google.gms.google-services'

The error I am getting is:

Error:Failed to resolve: com.android.support:customtabs:25.4.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/%USERPROFILE%/AndroidStudioProjects/android-client/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>


and

Error:Failed to resolve: com.android.support.constraint:constraint-layout:1.1.0-beta1
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/%USERPROFILE%/AndroidStudioProjects/android-client/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

and

Error:Failed to resolve: com.android.support:cardview-v7:25.4.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/%USERPROFILE%/AndroidStudioProjects/android-client/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

I went aside with some answers to similar questions in this forum and went to SDK Manager> SDK Tools > Uppdate repositories. But it did not work!!

Any Ideas where this error is coming from?? I am guessing it is because of the android SDK version, Is that a correct guess?

Edit: I am putting %USERPROFILE% instead of my user folder name.

KENdi
  • 7,576
  • 2
  • 16
  • 31
Maged Saeed
  • 1,784
  • 2
  • 16
  • 35
  • Possible duplicate of [How do I add a library project to Android Studio?](https://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-android-studio) – Chisko Jul 27 '17 at 00:23

1 Answers1

0

Nope. You are trying to download an unexisting repo. Where did you get the 25.4.0 versioning from? Anyhow. if you are targetting Nougat you should replace all 25.4.0 to 25.3.1'

Also, dont use 26.+. It's highly discouraged as Android Studio itself will tell you. There's no need to do such a thing.

Chisko
  • 3,092
  • 6
  • 27
  • 45
  • I have found a solution but I do not know if it is correct. I just reinstalled Google repository packages again and add google maven dependencies then adb kill-server and start-server. The problem seems to be resolved but I am not sure whether it is temporarily or permanently resolved. – Maged Saeed Jul 26 '17 at 21:59
  • 1
    Good. But at least remove the `26.+` thing. It will save you headaches. Trust me. – Chisko Jul 26 '17 at 22:01
  • I have removed all of these packages with 26.+ since I downloaded the whole google repository. I am not sure of what I am doing, but the code is executed fine. – Maged Saeed Jul 26 '17 at 22:06
  • Nice. I don't need it, but for future references, make sure you upvote/mark answers as correct when someone helps you. Otherwise you will be seen as a *help vampire* and you will likely not be helped in the future. – Chisko Jul 26 '17 at 22:09
  • Thanks for that generous help, time and effort. I really appreciate it Mr @Chisko ^_^ – Maged Saeed Jul 26 '17 at 22:31
  • I already have made an upvote but it is not shown to the public regarding the forum policies. – Maged Saeed Jul 26 '17 at 22:32