Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init Sdk and getting installs #78

Closed
fedorstepanovv opened this issue Feb 23, 2021 · 4 comments
Closed

Init Sdk and getting installs #78

fedorstepanovv opened this issue Feb 23, 2021 · 4 comments

Comments

@fedorstepanovv
Copy link

fedorstepanovv commented Feb 23, 2021

I have successfully connected appsflyer to my app to get clicks and impressions. To get installs, i tried to install referrer to my manifest file. But it doesnt work, i dont have any numbers in my dashboard. I decided that the main problem is that i didnt init sdk.

My code to init appsflyer:

AppsflyerSdk _appsflyerSdk;
final AppsFlyerOptions options = AppsFlyerOptions(
afDevKey: DotEnv().env["DEV_KEY"],
appId: DotEnv().env["APP_ID"],
showDebug: true);
_appsflyerSdk = AppsflyerSdk(options);
_appsflyerSdk.initSdk(registerConversionDataCallback: true, registerOnAppOpenAttributionCallback: true);

I expected my app will build and i am going to test my installs. And for the first time my app has built successfully and i started testing it. I've added devices to test the app as i read in documentation. Anyway i didnt get any numbers in my dashboard. And now when i try to launch my app - i am getting this issue, when debug says:

D/AppsFlyer_6.1.4( 5744): Install referrer is allowed
D/AppsFlyer_6.1.4( 5744): Connecting to Install Referrer Library...
#56 pc 004ce62f /apex/com.android.art/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, char*)+735) (BuildId: 123e60096a46399e6f56e4eb5c70759a)
#57 pc 003f8a8e /apex/com.android.art/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, char*, art::Primitive::Type, art::InvokeType)+2846) (BuildId: 123e60096a46399e6f56e4eb5c70759a)
#58 pc 003e60b9 /apex/com.android.art/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, char*)+73) (BuildId: 123e60096a46399e6f56e4eb5c70759a)
#59 pc 0008f90e /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+62) (BuildId: 588f2cd5873ff4273bb25b25edb82606)
#60 pc 00098c8e /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+910) (BuildId: 588f2cd5873ff4273bb25b25edb82606)
#61 pc 00003804 /system/bin/app_process32 (main+1588) (BuildId: c5eedbfb6130af84c3db8e121fb1202e)
#62 pc 000522e3 /apex/com.android.runtime/lib/bionic/libc.so (__libc_init+115) (BuildId: a690ed60a8b6a282b41dd991389b5fdb)
Lost connection to device.
Exited (sigterm)

@GM-appsflyer
Copy link
Contributor

Hey @fedorstepanovv,
Thanks for reaching out!

Please try updating to the latest version and notice the init API change.
If not possible, please provide us with full logs when reproducing the issue (try using adb logcat).

Thanks!

@fedorstepanovv
Copy link
Author

Hey, i have changed the version of an appsflyer but still have the same issue. What did you mean, whey said about the init api change? And one more question. Can i init this sdk throught the async function in my init state? Or i need to make it only through future builder? Thanks for your reply

@fedorstepanovv
Copy link
Author

This is my logcat after i have updated appsflyer to the last version (6.2.0)

02-24 13:18:59.586 31051-31051/com.appsprod.amazing_girls D/AppsFlyer_6.2.0: Install referrer is allowed
02-24 13:18:59.586 31051-31051/com.appsprod.amazing_girls D/AppsFlyer_6.2.0: Connecting to Install Referrer Library...
02-24 13:18:59.590 31051-31051/com.appsprod.amazing_girls D/AppsFlyer_6.2.0: Initializing AppsFlyer SDK: (v6.2.0.91)
02-24 13:18:59.628 31051-31051/com.appsprod.amazing_girls E/flutter: [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.NoSuchMethodError: No virtual method startTracking(Landroid/content/Context;)V in class Lcom/appsflyer/AppsFlyerLib; or its super classes (declaration of 'com.appsflyer.AppsFlyerLib' appears in /data/app/com.appsprod.amazing_girls-2/base.apk)
at com.appsflyer.appsflyersdk.AppsflyerSdkPlugin.initSdk(AppsflyerSdkPlugin.java:536)
at com.appsflyer.appsflyersdk.AppsflyerSdkPlugin.onMethodCall(AppsflyerSdkPlugin.java:118)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:195)
at android.app.ActivityThread.main(ActivityThread.java:5389)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
02-24 13:18:59.628 31051-31051/com.appsprod.amazing_girls A/flutter: [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).
02-24 13:18:59.628 31051-31051/com.appsprod.amazing_girls A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 31051 (d.amazing_girls)

@fedorstepanovv
Copy link
Author

Finally fixed the issue. It was because of my old package version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants