I am trying to add brain tree services to my Unity app, as i need real item purchasing.
I am able to get the drop in ui working in a blank android project and created a module that handles it. However whenever i try to add the necessary aar file i get gradle build issues.
I have exported my project to android studio to get more comprehensive error codes and fine grained control over gradle.
However any configuration of gradle still gives me a Program type already present.
This is my the dependencies for my Gradle File
apply plugin: 'com.android.application'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation(name: 'android-maps-utils-0.5', ext:'aar')
implementation(name: 'google-maps-view-lib-release', ext:'aar')
implementation(name: 'play-services-base-11.0.2', ext:'aar')
implementation(name: 'play-services-basement-11.0.2', ext:'aar')
implementation(name: 'play-services-maps-11.0.2', ext:'aar')
implementation(name: 'play-services-tasks-11.0.2', ext:'aar')
implementation(name: 'support-compat-25.2.0', ext:'aar')
implementation(name: 'support-core-ui-25.2.0', ext:'aar')
implementation(name: 'support-core-utils-25.2.0', ext:'aar')
implementation(name: 'support-fragment-25.2.0', ext:'aar')
implementation(name: 'support-media-compat-25.2.0', ext:'aar')
implementation 'com.braintreepayments.api:braintree:2.20.0'
implementation ('com.braintreepayments.api:drop-in:3.2.1')
{
exclude group: 'com.android.support.annotation'
exclude module: 'com.android.support.v4.app'
exclude module: 'com.android.support.v4.media'
exclude module: 'com.android.support:support-v4:28.0.0'
exclude group: 'support-v4'
exclude module: 'support-v13'
}
//implementation(name: 'support-v4-25.2.0', ext:'aar')
}
What i get is:
Error: Program type already present: android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$1