morita657
morita657

Reputation: 11

Error: Program type already present: com.appsflyer.AFExecutor

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

What I have tried.

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.

Upvotes: 1

Views: 658

Answers (2)

morita657
morita657

Reputation: 11

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!

Upvotes: 0

k4dima
k4dima

Reputation: 6261

Try ./gradlew clean, clean project and invalidate caches and restart. If does not help than delete all build and .idea folders, .iml files.

Upvotes: 0

Related Questions