Can't use AliPay and Alibaba Push sdks in the same project due to Duplicate classes

131 views Asked by At

I added Allibaba Push SDK to my Android project by adding the following module: com.aliyun.ams:alicloud-android-push.

Then I tried to add the AliPay SDK in order to use payment via AliPay by downloading the following aar file: alipaySdk-15.7.4-20200228192259 (this is the latest version according the the AliPay docs).

After adding both modules, the project won't compile due to several duplicate classes that exist in both modules.

I tried excluding the classes this way:

implementation(name: 'alipaySdk-15.7.4-20200228192259', ext: 'aar') {
        exclude group: 'com.ut.device.UTDevice', module: 'alicloud-android-push'
    }

com.ut.device.UTDevice is one of the duplicated classes..

But the duplicate message still persist for this class. I also try to exclude the whole package (com.ut.*) but that didn't work either.

Anyone knows how to resolve this?

Thanks

0

There are 0 answers