lukaspili / Reactive-Billing

Lightweight reactive wrapper around In App Billing API v3 for Android
https://play.google.com/store/apps/details?id=com.github.lukaspili.reactivebilling.sample
MIT License
247 stars 33 forks source link

com.android.vending.billing.IInAppBillingService is defined multiple times #25

Closed rookey closed 3 years ago

rookey commented 3 years ago

I'm trying to use this implementation in my project, but can't compile it with the error message above.

Type com.android.vending.billing.IInAppBillingService is defined multiple times: C:\www\e-Work\test_ed1\app\build\intermediates\project_dex_archive\debug\out\com\android\vending\billing\IInAppBillingService.dex, C:\www\e-Work\test_ed1\app\build\intermediates\external_libs_dex\debug\mergeExtDexDebug\classes.dex

My build.gradle:

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
    }
} 
rootProject.allprojects {
    repositories {
        google()
        jcenter()
    }
}
apply plugin: 'com.android.application'
android {
    compileSdkVersion 28
    buildToolsVersion '29.0.2'
    defaultConfig {
        applicationId "com.myproject"
        minSdkVersion 17
        targetSdkVersion 26
    }
    lintOptions {
        disable 'InvalidPackage'
    } 
}
android {
    useLibrary 'org.apache.http.legacy'
}
dependencies {
    implementation 'com.google.android.gms:play-services-ads:19.5.0'
    compile 'com.github.lukaspili.reactive-billing:reactive-billing:0.2@aar'
    compile 'io.reactivex:rxjava:1.1.5'
//    compile 'com.jakewharton.rxrelay:rxrelay:1.1.0'
    compile 'io.reactivex:rxandroid:1.2.0'
}

Any idea how to fix that? 
rookey commented 3 years ago

…ended up not using it, so I don't need a solution anymore. Problem may well have been on my side only? Issue can be removed