2

I have integrated AppsFlyer SDK for analytics, it is tracking app installs but somehow when using uninstalls feature it crashes.

I have initialized SDK in MyApplication

AppsFlyerLib.getInstance().startTracking(this, Constants.APPS_FLYER_KEY);

I dont have GCM/FCM in my application so i have followed Android Uninstall Tracking

So i have written this code in my manifest

<service android:name="com.appsflyer.FirebaseInstanceIdListener">
    <intent-filter>
        <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
    </intent-filter>
</service>

But it is not able to find FirebaseInstanceIdListener class enter image description here

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.appsflyer.FirebaseInstanceIdListener"
Ravi
  • 34,851
  • 21
  • 122
  • 183
  • If I am not wrong you have to write the subclass of `FirebaseInstanceIdListener` which you would have written, like `MyInstanceIdService`. Try this :) – Chintan Soni May 01 '17 at 10:08
  • @ChintanSoni actualy i have followed guideline provided by them, `FirebaseInstanceIdListener` might be their own class which they are using for uninstall tracking. – Ravi May 01 '17 at 10:15

2 Answers2

4

Check the Android SDK installation steps. I followed this so I was not able to reproduce it.

So, I thought about possible cause, I tried to reproduce this error by simply not adding mavenCentral() in repositories object. And I faced the same error as you got.

Just to make sure if you have added below lines in your app.gradle before dependencies object:

repositories {
    mavenCentral() 
}
Chintan Soni
  • 24,761
  • 25
  • 106
  • 174
0

Adding to @Chintan-Soni's answer:

Our native Android SDK is distributed via MavenCentral repository, which replicates with the JCenter repository.
However, as we don't have control over this process, we instruct developers to add the MavenCentral repository to their project-level Gradle configuration file (build.gradle):

buildscript {
  repositories {
    mavenCentral()
  }
}

And of course, Add the compile dependency with the latest version of the AppsFlyer SDK in the app-level build.gradle file:

dependencies {
 compile 'com.appsflyer:af-android-sdk:4+@aar'
}

A local JAR file is another option to get the SDK.

You can find all the information required for integrating AppsFlyer SDK - here.


Please submit any issues to support@appsflyer.com, so our support team could provide you with a quick and professional response.

When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , reproducing steps, logs, code snippets and any additional information that could help.

shachar0n
  • 174
  • 10