Closed mylake closed 7 years ago
I got the same code. If you solved this, could you help me? Thanks.
I also ran into this. Fix: add the following to your MainApplication.java
file:
import com.evollu.react.fa.FIRAnalyticsPackage; // <-- add this line
import com.facebook.react.ReactPackage;
...
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
...
new FIRAnalyticsPackage() // <-- add this line
);
}
yep, link issue
I think the issue is still there and rnpm link the react-native-firebase-analytics package with MainActivity.java, not to MainApplication.java
I'm having the same problem with iOS (linking error because of logEvent(params)), however, I've just noticed this when I tried to install everything via rnpm install react-native-firebase-analytics :
" rnpm-link info Linking react-native-firebase-analytics android dependency rnpm-link ERR! It seems something went wrong while linking. Error: Cannot find module '../project-name/node_modules/react-native/package.json' " I'm currently using react-native-cli 2.0.1
How can we solve this issue?
Thank you!
looks like you are running it in wrong folder?
using "react": "15.3.2", "react-native": "0.35.0", "react-native-firebase-analytics": "^1.0.5" Devices I use is => Android 7.0, API Level: 24
I have followed the README setting and want to use logEvent.
I just use the README sample code to logEvent, but I got this error as below:
var Analytics = require('react-native-firebase-analytics');
Analytics.logEvent('view_item', { 'item_id': 'login' });
Could you help me to figure out what cause this problem? Thank you