I’m trying to setup a new Android project with the SDK Add-on. I’ve follow the steps described in Datalogic Android SDK | Technical Documentation, but when I try to build the project I receive the following error:
Dependency ‘androidx.appcompat:appcompat-resources:1.5.1’ requires libraries and applications that
depend on it to compile against version 32 or later of the
Android APIs.
:app is currently compiled against Datalogic:Datalogic SDK v1:29.
I tried changing androidx.appcompat:appcompat-resources and com.google.android.material:material to older versions, but I then end up with the following error that I don’t know how to resolve:
error: attribute android:dataExtractionRules not found
Hey Louis,
Unfortunately, our SDK documentation for initial setup of using our SDK is currently outdated.
We are working on updating them now, but the update may take some time.
What you want to do is:
In Android Studio, start a new blank project.
Open your settings.gradle (Project Settings).
In your settings.gradle add the following line to your repositories, it would be line 13 on a blank project: maven { url "https://jitpack.io" }
Open your build.grade (:app)
In your build.gradle add the following line to your dependencies, it would be line 37 on a blank project: implementation 'com.github.datalogic:datalogic-android-sdk:1.31'
A notification should appear at the top of your code to sync your project files, click “Sync Now”
After following these steps, the project should build without errors and you should be able to proceed.
Our documentation has been updated, check that out here:
I would make sure you followed all the steps listed there.
Also, our SDK has been updated to 1.34, so you will want to use that for the latest features.
Drew Hugentobler L3 Mobile Computer Specialist Support Engineer
Depending on your project settings, your gradle build system could be based on Groovy or Kotlin.
Depending on the language, the syntax could be slightly different.
Gradle scripts based on Groovy
In the settings.gradle file of the project add the following line:
maven { url "https://jitpack.io" }
This line can be added in your settings.gradle file into the dependencyResolutionManagement block as follows:
These days the Datalogic SDK online documentation has been updated to offer sample instructions on how to reference the SDK’s Maven repository from the project’s Gradle files in the two different Gradle scripting languages, Groovy or Kotlin: