1

My Android project is using Maven and I have no option available to move to gradle. I have integrated Firebase messaging in a sample gradle project, but now I want to implement it in my maven based project. But I am unable to fix the dependencies.

The dependencies that I declared in sample project gradle are

compile 'com.google.firebase:firebase-messaging:9.4.0' compile 'com.google.firebase:firebase-database:9.4.0' compile 'com.google.firebase:firebase-core:9.4.0' 

For maven dependencies I tried to find these on maven but was not able to get them over there, although I manage to find few other dependencies that look relevant to them, but they not what I am looking for.

com.firebase firebase-client-android 2.5.2

<dependency> <groupId>com.firebase</groupId> <artifactId>firebase-client-parent</artifactId> <version>2.5.2</version> <type>pom</type> </dependency> <dependency> <groupId>com.firebase</groupId> <artifactId>firebase-token-generator</artifactId> <version>2.0.0</version> </dependency> 

This post mentions that he was able to get dependecy working on maven, I tried it out but was still giving error stating "aar" not found.

That makes me wonder is maven dependency is possible for Firebase?

1 Answer 1

1

All firebase module's .aar and .pom files are available inside Android SDK, exact path to be

/Users/{username}/Library/Android/sdk/extras/google/m2repository/com/google/firebase/

Once there you can retrieve the .aar file of whatever module you looking for and change the file type to .zip. Extract the content of .zip file and it will give you classes.jar file. You can rename this .jar file by the module name and use it in your project as you use any other jar file, no need to add maven dependency.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.