Error Installing Android SDK for new Android Studio project

Good day

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:

  1. 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

Is there a step that I am missing?

1 Like

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:

  1. In Android Studio, start a new blank project.
  2. Open your settings.gradle (Project Settings).
  3. 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" }
  4. Open your build.grade (:app)
  5. 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'
  6. 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.

1 Like

Hi Drew

Thanks! This resolved the issue

1 Like

For additional reference on possible building errors, see also this post:

Simone Callegari
Datalogic Mobile Products - L3 Specialist SW Engineer