程序类型已存在:com.android.vending.billing.IInAppBillingService

问题描述 投票:16回答:4

问题只发生在发布版本或生成签名的apk上,当我构建调试时 - 没有这样的问题。

问题在升级到版本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:1.1.5@aar'
    implementation 'com.github.eggheadgames:Siren:1.5.0'
    implementation 'me.leolin:ShortcutBadger:1.1.18@aar'
    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:1.1.5@aar'
    //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:2.8.9@aar'
    implementation 'com.mikepenz:fontawesome-typeface:4.7.0.1@aar'
    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:2.9.1@aar') {
        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:1.1.8@aar'
    implementation 'com.yalantis:ucrop:2.2.0'
    implementation 'com.appsflyer:af-android-sdk:4.8.8@aar'
    implementation 'com.android.installreferrer:installreferrer:1.0'
}

M失去了解决方案来解决这个问题,任何建议 - 欢迎。谢谢!

android multidex
4个回答
15
投票

解决方案很接近:最后能够通过简单删除aidl import lib来解决问题,现在编译成功调试和发布,不知道为什么这样,google中的inAppPurchases文档似乎已经过时了,好像这个类是从某个地方添加的自动。


5
投票

从android studio中删除IinAppBillingService.aidl文件,然后再次运行该应用程序。希望这会有所帮助。


0
投票

在我的情况下,同样的文件在我搜索的时候在.aidl的不同位置添加了两次,在windows explorer项目的源代码然后我能找到它,然后我删除它,之后它APK生成成功!


0
投票

在我的情况下,同样的文件在我搜索的时候在.aidl的不同位置添加了两次,在windows explorer项目的源代码然后我能找到它,然后我删除它,之后它APK生成成功!

© www.soinside.com 2019 - 2024. All rights reserved.