Тип программы уже присутствует: com.android.vending.billing.IInAppBillingService - программирование
Подтвердить что ты не робот

Тип программы уже присутствует: com.android.vending.billing.IInAppBillingService

Проблема возникает только при сборке релиза или при генерации подписанного apk, когда я строю debug - нет такой проблемы.

Проблема появилась сразу после обновления AS до версии 3.1

Program type already present: com.android.vending.billing.IInAppBillingService
Message{kind=ERROR, text=Program type already present: com.android.vending.billing.IInAppBillingService, sources=[Unknown source file], tool name=Optional.of(D8)}

enter image description here:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
    implementation('org.apache.httpcomponents:httpmime:4.3') {
        exclude module: "httpclient"
    }
    implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.0'
    implementation 'com.github.clans:fab:1.6.4'
    implementation 'com.android.billingclient:billing:1.0'
    implementation 'com.nineoldandroids:library:2.4.0'
    implementation 'com.daimajia.slider:library:[email protected]'
    implementation 'com.github.eggheadgames:Siren:1.5.0'
    implementation 'me.leolin:ShortcutBadger:[email protected]'
    implementation 'me.everything:overscroll-decor-android:1.0.4'
    implementation 'com.baoyz.pullrefreshlayout:library:1.2.0'
    implementation 'com.nineoldandroids:library:2.4.0'
    implementation 'com.daimajia.slider:library:[email protected]'
    //implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.github.esafirm.android-image-picker:imagepicker:1.8.0'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    implementation 'com.google.android.gms:play-services-places:12.0.0'
    implementation 'com.google.android.gms:play-services-gcm:12.0.0'
    implementation 'com.github.mukeshsolanki:country-picker-android:1.1.9'
    implementation 'com.github.rey5137:material:1.2.4'
    implementation 'com.mikepenz:iconics-core:[email protected]'
    implementation 'com.mikepenz:fontawesome-typeface:[email protected]'
    implementation 'com.mcxiaoke.volley:library:1.0.19'
    implementation 'com.android.support:design:27.0.2'
    implementation 'com.android.support:animated-vector-drawable:27.0.2'
    implementation 'com.android.support:customtabs:27.0.2'
    implementation 'com.android.support:support-annotations:27.0.2'
    implementation 'com.android.support:recyclerview-v7:27.0.2'
    implementation 'com.android.support:cardview-v7:27.0.2'
    implementation 'com.android.support:support-v4:27.0.2'
    implementation 'com.android.support:appcompat-v7:27.0.2'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'org.greenrobot:eventbus:3.0.0'
    implementation 'com.google.code.gson:gson:2.8.0'
    implementation('com.crashlytics.sdk.android:crashlytics:[email protected]') {
        transitive = true
    }
    implementation 'com.google.firebase:firebase-firestore:12.0.0'
    implementation 'com.google.firebase:firebase-storage:12.0.0'
    implementation 'com.google.firebase:firebase-database:12.0.0'
    implementation 'com.google.firebase:firebase-messaging:12.0.0'
    implementation 'com.google.firebase:firebase-auth:12.0.0'
    implementation 'com.google.firebase:firebase-core:12.0.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.30.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'me.relex:circleindicator:[email protected]'
    implementation 'com.yalantis:ucrop:2.2.0'
    implementation 'com.appsflyer:af-android-sdk:[email protected]'
    implementation 'com.android.installreferrer:installreferrer:1.0'
}

М потерял решение, чтобы исправить это, любые предложения - добро пожаловать. Спасибо!

4b9b3361

Ответ 1

Решение было близко: наконец, удалось решить проблему простым удалением libl libl libl, теперь успех компиляции как для отладки, так и для выпуска, не знаю, почему именно так, Документация кажется устаревшей для inAppPurchases в google, кажется, что этот класс добавлен откуда-то автоматически.

Ответ 2

Удалите файл IinAppBillingService.aidl из студии Android и снова запустите приложение. Надеюсь, это поможет.

Ответ 3

в моем случае один и тот же файл добавлялся два раза в другое место с помощью .aidl при поиске в исходном коде проекта Windows Explorer, затем я смог его найти, затем удаляю, после того как APK успешно сгенерирован!

Ответ 4

Android Studio 3.3.2

Удалить

implementation 'com.android.billingclient:billing:1.2'

от

build.gradle(Module: app)

если вы используете стороннюю библиотеку для биллинга в приложении