flurry / react-native-flurry-sdk

React Native Flurry SDK
Apache License 2.0
45 stars 13 forks source link

Error compiling after adding messaging with Android #20

Closed bradenpowers closed 4 years ago

bradenpowers commented 4 years ago

Hello,

I am currently trying to set up messaging and I am running into an issue with Android. I was going through the set up and I am getting an error when trying to launch the app in my emulator. I get tihs error:

error: package FlurryModule does not exist new FlurryModule.Builder()

I am currently running the lastest version of react native and the Flurry SDK.

This is what is in my MainApplication.java file

new FlurryModule.Builder() .withCrashReporting(true) .withMessaging(true) // optional user's native FlurryMarketingOptions or FlurryMessagingListener. .build(this, apiKey);

Thanks in advanced.

poting-oath commented 4 years ago

You need to import this class. In your MainApplication.java,

import com.flurry.android.reactnative.FlurryModule;
...
    new FlurryModule.Builder(). ... .build(this, apiKey);
bradenpowers commented 4 years ago

That would help wouldn't it? LOL. Can I suggest that you guys put out a sample React Native project on how you would go about implementing this service. I am evaluating a lot of your competitors and they all have sample react projects.

bradenpowers commented 4 years ago

adding the import fixed the issue that I am having