Google recently released new verison of Firebase. So I was trying to migrateto Firebase analytics.
So what is the difference between these libraries
com.google.firebase:firebase-analytics:9.0.0
and
com.google.firebase:firebase-core:9.0.0
I found that core is for analytics too. So whats the difference? Which should I use.
Currently there is no difference.
The firebase-core:9.0.0
has no classes and resources in the aar file and contains the firebase-analytics
as you can check in the pom file.
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-core</artifactId>
<version>9.0.0</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-analytics</artifactId>
<version>9.0.0</version>
<scope>compile</scope>
<type>aar</type>
</dependency>
</dependencies>
</project>
Also in the doc you can find:
com.google.firebase:firebase-core:9.0.0 ->> Analytics
Apparently since June 12, 2018 declaring com.google.firebase:firebase-core is required to use any of the Firebase features (firebase.google.com/support/release-notes/android#update_may_23_2018). According to firebase.google.com/docs/android/setup#available-libraries , firebase-analytics is not even a public module, and is probably not intended to be used directly.
来源:https://stackoverflow.com/questions/37337834/what-the-difference-in-firebase-core-and-firebase-analytics-libraray