I'm struggling to implement AppsFlyer on Android using Java.
I have looked into a couple of posts already such as this, this.
Here is the entire error message: [org.gradle.api.Project] AGPBI: {"kind":"error","text":"Program type already present: com.appsflyer.AFExecutor","sources":[{}],"tool":"D8"}
The version AppsFlyer SDK: 5.+ Android Studio: 3.5.2
Situation
I have done till 4.1 of this guide so far so good.
On AndroidManifest.xml
, the main class name of AF has implemented with android.name
attribute.
On AndroidManifest.xml
, receiver
tag commented out (because in this phase I don't believe I do not need a precise data tracking feature.)
What I have tried.
./gradlew app:dependencies | less
To find out AFExecutor
in other dependencies
To exclude the program
implementation ('com.appsflyer:af-android-sdk:5.+'){
exclude module: 'com.appsflyer'
}
implementation ('com.appsflyer:af-android-sdk:5.+'){
exclude module: 'AFExecutor'
}
If you have any insights, I'd love to hear that.
After exploring a bunch of dependencies, I found the solution. The reason was there was a conflict between com.appsflyer:af-android-sdk:5.+
and AF-Android-SDK.jar
which had installed manually. After removing the JAR file and built again, I could make it at last! Thank you so much for sharing your experiences, however, the solution was simple!