ZarinPal / Android-SDK

ZarinPal Android Client in-App Billing
13 stars 7 forks source link

Can not add skd dependencies in my app #20

Closed aminkt closed 1 year ago

aminkt commented 1 year ago

Describe the bug I want to use Zarinpal SDK in my application to get access to the payment gateway. For this purpose, I have added the below lines in my app build.gradle:

dependencies {
....
implementation "com.zarinpal:mpg:$zarinpal_sdk_version"
implementation "com.zarinpal:payment-provider-ktx:$zarinpal_sdk_version"
implementation "com.zarinpal:payment-provider:$zarinpal_sdk_version"
}

and also in the project build.gradle I have added below lines:

buildscript {
    ext {
      ....
        zarinpal_sdk_version = '0.6.2'
    }
    .....
}

I can sync gradle successfully but when I build my application, I am getting the below error:

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform emoji2-views-helper-1.4.0-alpha01.aar (androidx.emoji2:emoji2-views-helper:1.4.0-alpha01) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find emoji2-views-helper-1.4.0-alpha01.aar (androidx.emoji2:emoji2-views-helper:1.4.0-alpha01).
        Searched in the following locations:
            https://dl.google.com/dl/android/maven2/androidx/emoji2/emoji2-views-helper/1.4.0-alpha01/emoji2-views-helper-1.4.0-alpha01.aar

Information

Additional context I have tried to build with VPN and without it. It's no different.

Your Suggestion for fixing No idea :)

ImanX commented 1 year ago

This issue faced out on your project, in my opinion you should impl new version of emoji2-views-helper-1.4.0-alpha01.aar and build again.