Open sunglee opened 7 years ago
I was able to run without any issues. For some reasons, rnpm link react-native-firebase-analytics
didn't make right changes. Here are working changed that I had to add manually:
In /android/settings.gradle
,
rootProject.name = 'Your_Project_Name'
include ':app', ...other modules you use, ':react-native-firebase-analytics'
project(':react-native-firebase-analytics').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-analytics/android') //<-- add this
In /android/build.gradle
,
dependencies {
classpath 'com.google.gms:google-services:3.0.0' //<-- add this as described in installation
}
In /android/app/build.gradle
, (per #17)
apply plugin: 'com.google.gms.google-services' //<-- add this at the bottom of the file
And finally in /androi/app/src/main/java/.../MainApplication.java
,
import com.evollu.react.fa.FIRAnalyticsPackage; //<-- add this in the lines of imports
//and at a little down below
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new FIRAnalyticsPackage() //<-- add this
)
Hope this helps.
@sunglee can u close this? or could u add this info to README?
Hi,
I followed the installation direction as described in this repo. However, I got the following error when I run
react-native run-android
. Am I missing anything?Thanks for your help.