elanic-tech / react-native-apps-flyer Goto Github PK
View Code? Open in Web Editor NEWA react native wrapper for AppsFlyer
A react native wrapper for AppsFlyer
Hello,
Would it be possible to get this setup to work with react-native link
? Just handy for build scripts and the like!
Cheers
I have encountered following problems while trying to build Android app including react-native-apps-flyer package:
One.
A problem occurred configuring project ':app'.
> A problem occurred configuring project ':react-native-apps-flyer'.
> Could not resolve all dependencies for configuration ':react-native-apps-flyer:_debugCompile'.
> Could not find any version that matches com.facebook.react:react-native:0.33.+.
Versions that do not match:
0.20.1
0.20.0
0.19.1
0.19.0
0.18.0
+ 12 more
solution:
// in https://github.com/ppsreejith/react-native-apps-flyer/blob/master/android/build.gradle#L26
- compile 'com.facebook.react:react-native:0.33.+'
+ compile 'com.facebook.react:react-native:+'
Two.
error: method getAppsFlyerUID(Callback) is already defined in class RNAppsFlyerModule
solution:
removing these lines -
https://github.com/ppsreejith/react-native-apps-flyer/blob/master/android/src/main/java/com/ppsreejith/RNAppsFlyerModule.java#L75-L79
I am new to Android so not sure if these problems are just for me or problem of the package. Thought it can be worth checking with the maintainers.
Hello,
First of all, thanks for the great package. We are using it in our production app and it works great!
Now that we have a couple of commits after 1.2.5
release do you guys mind releasing a new version please? I am in need of one of the patches committed after 1.2.5
Thanks!
Currently the android module does not fire callbacks on init and you cannot pass event values to the api.
Hi, when i install my app from playstore withreact-native-apps-flyer
implemented, app crash.
Logcat:
E/AndroidRuntime(11075): java.lang.RuntimeException: Unable to instantiate receiver com.google.android.apps.analytics.AnalyticsReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.analytics.AnalyticsReceiver" on path: DexPathList[[zip file "/data/app/com.myproject-1/base.apk"],nativeLibraryDirectories=[/data/app/com.myproject-1/lib/arm, /vendor/lib, /system/lib]]
I think i need Google analytics.
For use your component i had to edit your android/build.gradle
and change this:
compile 'com.google.android.gms:play-services-ads:+'
compile 'com.google.android.gms:play-services-identity:+'
And for fix this last error i try to add in react-native-apps-flyer
build.gradle:
compile "com.google.android.gms:play-services-analytics:+"
But it doesnt fix component.
I also try to add compile "com.google.android.gms:play-services-analytics:+"
to my app/build.gradle but cant compile:
Found com.google.android.gms:play-services-analytics:+, but version 9.0.0 is needed for the google-services plugin.
:app:processReleaseGoogleServices FAILED
And with compile "com.google.android.gms:play-services-analytics:9.0.0"
or 9.2.0 (last):
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzlt;
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzlt;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
How can i fix it? Thanks
Full logcat of crash error:
D/AndroidRuntime(11075): Shutting down VM
E/AndroidRuntime(11075): FATAL EXCEPTION: main
E/AndroidRuntime(11075): Process: com.myproject, PID: 11075
E/AndroidRuntime(11075): java.lang.RuntimeException: Unable to instantiate receiver com.google.android.apps.analytics.AnalyticsReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.analytics.AnalyticsReceiver" on path: DexPathList[[zip file "/data/app/com.myproject-1/base.apk"],nativeLibraryDirectories=[/data/app/com.myproject-1/lib/arm, /vendor/lib, /system/lib]]
E/AndroidRuntime(11075): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2623)
E/AndroidRuntime(11075): at android.app.ActivityThread.access$1800(ActivityThread.java:154)
E/AndroidRuntime(11075): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398)
E/AndroidRuntime(11075): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(11075): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(11075): at android.app.ActivityThread.main(ActivityThread.java:5292)
E/AndroidRuntime(11075): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(11075): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(11075): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/AndroidRuntime(11075): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
E/AndroidRuntime(11075): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.analytics.AnalyticsReceiver" on path: DexPathList[[zip file "/data/app/com.myproject-1/base.apk"],nativeLibraryDirectories=[/data/app/com.myproject-1/lib/arm, /vendor/lib, /system/lib]]
E/AndroidRuntime(11075): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AndroidRuntime(11075): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime(11075): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
E/AndroidRuntime(11075): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2618)
E/AndroidRuntime(11075): ... 9 more
E/AndroidRuntime(11075): Suppressed: java.lang.ClassNotFoundException: com.google.android.apps.analytics.AnalyticsReceiver
E/AndroidRuntime(11075): at java.lang.Class.classForName(Native Method)
E/AndroidRuntime(11075): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
E/AndroidRuntime(11075): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
E/AndroidRuntime(11075): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
E/AndroidRuntime(11075): ... 11 more
E/AndroidRuntime(11075): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
W/ActivityManager( 1571): Force finishing activity 1 com.myproject/.MainActivity
I've recently initially the package into a project and I noticed that the latest code hasn't been published to npm. As we use rnpm to install the project as a dependency, it would be really great if the latest version could be published.
Thanks
JP
in case you use any other library beside apps-flyer, which has the following dependencies:
com.google.android.gms:play-services-ads
com.google.android.gms:play-services-identity
Compilation will fail and exit with following error:
Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzaj.class
import af from 'react-native-apps-flyer';
af.sendTrackingWithEvent('my event name', params, this.debug);
should work.
raises error below.
2016-10-07 14:29:23.597796 惠首尔[821:381565] { [TypeError: u.default.sendTrackingWithEvent is not a function. (In 'u.default.sendTrackingWithEvent("af_complete_registration",e,this.debug)', 'u.default.sendTrackingWithEvent' is undefined)]
line: 489,
column: 449,
sourceURL: 'file:///var/containers/Bundle/Application/5668D7BF-F98C-44BA-8DEE-75E625B81213/%E6%83%A0%E9%A6%96%E5%B0%94.app/main.jsbundle' }
Since Version 1.1.1, .sendTrackingWithEvent
had exist, and i wrote my code like below.
import af from 'react-native-apps-flyer';
af.sendTrackingWithEvent('my event name', params, this.debug);
works fine.
Updated this lib package to 1.2.2, and .sendTrackingWithEvent
has been replaced to trackEvent
ref: b080657
and now the problem is, my code will throw this error, because it doesn't exist anymore.
2016-10-07 14:29:23.597796 惠首尔[821:381565] { [TypeError: u.default.sendTrackingWithEvent is not a function. (In 'u.default.sendTrackingWithEvent("af_complete_registration",e,this.debug)', 'u.default.sendTrackingWithEvent' is undefined)]
line: 489,
column: 449,
sourceURL: 'file:///var/containers/Bundle/Application/5668D7BF-F98C-44BA-8DEE-75E625B81213/%E6%83%A0%E9%A6%96%E5%B0%94.app/main.jsbundle' }
Every lib user has to change their method call part, and that's a BIG PROBLEM.
Maybe make it a alias method to allow both sendTrackingWithEvent
and trackEvent
?
I'm not sure about what the commiter's purpose is, but this needs to be fixed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.