question

mybmr avatar image
mybmr asked ·

Error while implementing CFP-SDK

Hello,

We are using "compile 'com.clover.cfp:clover-cfp-sdk:4.2.1'" SDK for implementation of Customer Facing Display in Station-Pro Device. We have the below configuration in the Gradle file.

android {
    compileSdkVersion 25
    defaultConfig {
        applicationId "com.example.customerfacingexample"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == 'com.android.support') {
                if (!requested.name.startsWith("multidex")) {
                    details.useVersion '25.4.0'
                }
            }
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:25.4.0'
    implementation 'com.android.support.constraint:constraint-layout:2.0.4'
    compile 'com.clover.cfp:clover-cfp-sdk:4.2.1'implementation 'com.clover.sdk:clover-android-sdk:latest.release'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}


But we are facing issue while build this project having SDK 'com.clover.cfp:clover-cfp-sdk:4.2.1" with version 4+ (4.0.1, 4.2.0, 4.2.1) , we need to work this SDK with targetVersion & compileSDK version 25.

We are facing the below issue, attached in imagescreenshot-from-2020-12-18-19-46-25.png


Any Suggestion or help in this will be very much helpful to us.

Thanks

semi-integrationsCustomersstation pro
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered ·

Do you know why you are doing this?

  1. configurations.all {
  2. resolutionStrategy.eachDependency { DependencyResolveDetails details ->
  3. def requested = details.requested
  4. if (requested.group == 'com.android.support') {
  5. if (!requested.name.startsWith("multidex")) {
  6. details.useVersion '25.4.0'
  7. }
  8. }
  9. }
  10. }



24 comments Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello David,

We are using it as we are facing the below issue if we don't add those lines in gradle file. Please find the error in below-attached screenshot.

screenshot-from-2020-12-21-10-46-01.png


Also i have query why this SDK "com.clover.cfp:clover-cfp-sdk:4.2.1" only works with targetSDKVersion and compileSDKVersion 28?

In Clover, we need to keep targetSDKVersion and compileSDKVersion 25, and we want to implement Customer-facing functionality in our app with RemoteDeviceConnector which is used for starting activity and communicating with the customer-facing device.


RemoteDeviceConnector dependencies or import packages only work when we add dependencies of Customer-facing SDK version 4.0.1, 4.2.0, 4.2.1 and this version only suports targetSDKVersion and compileSDKVersion 28 .

How can we use these CUstomer-Facing SDK version 4.0.1 , 4.2.0 , 4.2.1 with targetSDKVersion and compileSDKVersion 25?

0 Likes 0 · ·

"In Clover, we need to keep targetSDKVersion and compileSDKVersion 25"

You need to keep the targetSDKVersion 25 or under, but the same restriction doesn't apply to the compileSDKVersion - https://community.clover.com/questions/15557/clover-app-compiled-with-sdk-level-28.html

0 Likes 0 · ·
mybmr avatar image mybmr David Marginian ♦♦ ·

Hello David,

As per your suggestion, we have tried by changing compileSDKVersion to 28 and keeping targetSDKVersion 25 , But we need to make our application environment to androidx as compileSDKVersion is 28.

Moreover, it is clashing with clover SDK dependency (implementation 'com.clover.sdk:clover-android-sdk:latest.release') . Do you have any suggestions for this?

Hereby, I am attaching the screenshot of the error and our app.gradle file. Kindly find the attachment here.

Thanks

0 Likes 0 · ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community