New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find com.google.firebase:firebase-core:9.0.0. After attempting to build for Android. #106

Closed
spstratis opened this Issue Aug 15, 2016 · 11 comments

Comments

Projects
None yet
8 participants
@spstratis
Copy link

spstratis commented Aug 15, 2016

I've followed the Docs to install the firebase plugin. I have installed the newest versions of the Google Play Services (rev 32) and Google Repository (rev 32) through the SDK Manager.

My TNS version is 2.2.1 and tns-android is 2.2.0

In ~/platforms/android/build.gradle I have:

    dependencies {
        classpath "com.android.tools.build:gradle:2.1.2"
        classpath "com.google.gms:google-services:3.0.0"
    }

Along with this at the bottom of the file:
apply plugin: "com.google.gms.google-services"

The platforms directory also contains my google-services.json file. Yet when ever I run 'tns build android' I get the below error, Any guidance would be greatly appreciated.:

Could not resolve all dependencies for configuration ':_F0F1F2F3F4DebugCompile'.
Could not find com.google.firebase:firebase-core:9.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/firebase/firebase-core/9.0.0/firebase-core-9.0.0.pom
https://jcenter.bintray.com/com/google/firebase/firebase-core/9.0.0/firebase-core-9.0.0.jar
file:/Users/stevenstratis/Documents/Developer/CareGiver/platforms/android/libs/aar/firebase-core-9.0.0.jar
file:/Users/stevenstratis/Documents/Developer/CareGiver/platforms/android/libs/aar/firebase-core.jar
file:/usr/local/opt/android-sdk/extras/android/m2repository/com/google/firebase/firebase-core/9.0.0/firebase-core-9.0.0.pom
file:/usr/local/opt/android-sdk/extras/android/m2repository/com/google/firebase/firebase-core/9.0.0/firebase-core-9.0.0.jar
Required by:
:CareGiver:unspecified

@kamranarshad

This comment has been minimized.

Copy link

kamranarshad commented Aug 16, 2016

@spstratis Repeat the same step again but this time run tns run android, see if that helps

@spstratis

This comment has been minimized.

Copy link
Author

spstratis commented Aug 16, 2016

@kamranarshad Doesn't that run a build step as well?

@ShawnPavel

This comment has been minimized.

Copy link

ShawnPavel commented Aug 19, 2016

@spstratis I had this same problem. Turns out I needed the updated version of Google Play Services and Google Repository installed in the Android SDK Manager.

In Android SDK Manager:

  • Click into the SDK Tools tab

  • Select and install Google Play Services (rev 30+) and Google Repository (rev 26+).

  • Sync and Build your project.

    Source: Stack Overflow

@rossbg

This comment has been minimized.

Copy link

rossbg commented Sep 12, 2016

Same issue. I have all the latest Play Services and Google repository. Any other ideas?

@wdulin

This comment has been minimized.

Copy link
Contributor

wdulin commented Sep 17, 2016

I got this same error and it turned out that I had two Android SDK directories. The one I was updating from Android Studio was not reflected in the ANDROID_HOME folder as set in ~/.profile on my Mac. Worked fine after I fixed this.

@rossbg

This comment has been minimized.

Copy link

rossbg commented Sep 17, 2016

God bless you - I am now able to build as well. I had two folders, now the correct one is listed under ANDROID_HOME env variable.

On Windows - Android studio put it a long time ago under C:\Users\ [My-User-Name] \AppData\Local\Android\Sdk

@KirilRusev

This comment has been minimized.

Copy link

KirilRusev commented Sep 17, 2016

Thanks, I had the same issue - ANDROID_HOME pointing to wrong directory.

@EddyVerbruggen

This comment has been minimized.

Copy link
Owner

EddyVerbruggen commented Sep 18, 2016

Great job on helping each other out guys! Can I persuade one of you to send a PR to update the known Android issues in the readme?

@sarvagayatri

This comment has been minimized.

Copy link

sarvagayatri commented Oct 14, 2016

I am also facing the same issue. In my SDK manager the versions are:
Google Play Services: 33
Google Repository: 36

and for the same problem i found one link of same problem
[http://stackoverflow.com/questions/39707382/failed-to-resolve-com-google-firebasefirebase-core9-2-1]
so whats the solution to my problem, and how to revert the google repo to < rev 35 ??
My errors are:

> Could not find any version that matches com.google.firebase:firebase-core:9 .6.+. Versions that do not match: 9.4.0 9.2.1 9.2.0 9.0.2 9.0.1 + 1 more Searched in the following locations: https://jcenter.bintray.com/com/google/firebase/firebase-core/maven-met adata.xml https://jcenter.bintray.com/com/google/firebase/firebase-core/ file:/G:/FireBase/MyApp/platforms/android/libs/aar/ https://repo1.maven.org/maven2/com/google/firebase/firebase-core/maven- metadata.xml https://repo1.maven.org/maven2/com/google/firebase/firebase-core/ file:/C:/Program Files (x86)/Android/android-sdk/extras/android/m2repos itory/com/google/firebase/firebase-core/maven-metadata.xml file:/C:/Program Files (x86)/Android/android-sdk/extras/android/m2repos itory/com/google/firebase/firebase-core/ file:/C:/Program Files (x86)/Android/android-sdk/extras/google/m2reposi tory/com/google/firebase/firebase-core/maven-metadata.xml Required by: :MyApp:unspecified

@EddyVerbruggen

This comment has been minimized.

Copy link
Owner

EddyVerbruggen commented Oct 16, 2016

@sarvagayatri 9.6.1 is the latest version and part of Google Repository 36. The error says the latest version it can find is 9.4.0 so it looks like the SDK manager saves its dependencies in a different folder. Can you hover over the Google Repository in the SDK manager (see screenshot) to figure out the path? Then take a look and see if 9.6.x is there. Then compare that path with the paths you pasted as part of your stacktrace..

screen shot 2016-10-16 at 10 24 34

@sarvagayatri

This comment has been minimized.

Copy link

sarvagayatri commented Oct 17, 2016

wow, thx, its worked. actaully the installed folder and the stacktrace showing folder are different. thX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment