Point-of-sale icon

Migrate to Android 1.21.2 and later

From 1.21.2 version  1.21.2, the Adyen Android Library is going to be distributed as an Android Archive (AAR) file instead of Java Archive (JAR) file. This will allow easier integration as you will only have to import an AAR module into your project and add a dependency to it. 

Steps

To use the AAR file in Android Studio:

  1. Remove the old Adyen Android Library module (AndroidLibraryDist) dependency from your app module.

    1. Go to File > Project Structure in Android Studio.
    2. Select the app module in the Modules list on the left.
    3. Select the Dependencies tab. 
    4. Select the (AndroidLibraryDist) module dependency.
    5. Remove it from your app module by clicking the - button on the lower left.
  2. Remove the old Adyen Android Library module (AndroidLibraryDist) from your project.

    1. Go to File > Project Structure in Android Studio.
    2. Select the old Adyen Android Library module (AndroidLibraryDist).
    3. Remove the module from the project by pressing the - button on the top left corner.
  3. Delete the Adyen Android Library module from the file system.

  4. Import the new Adyen Android Library module.

    1. Go to File > Project Structure in Android Studio.
    2. Press the + button on the upper-left corner of the Project Structure window to add a new module. 
    3. In the Create new module screen: 

      1. Select Import .JAR/.AAR Package and click Next.
      2. In the file selector, browse to the adyen-android-library-{version}.aar file.
  5. Add a dependency in the app module to the Adyen library module.

    1. Go to File > Project structure in Android Studio.
    2. Select the app module in the Modules list on the left.
    3. Select the Dependencies tab. 
    4. Add dependency on the + button on the lower left corner. 
    5. Select 3.Module dependency in the drop down menu. 
    6. Select the Adyen library module you have previously added in step 3.
  6. Add dependency for appcompat-v7.

    1. Go to File > Project Structure in Android Studio.
    2. Select the app module in the Modules list on the left.
    3. Select the Dependencies tab. 
    4. Click the + button on the lower left to add the dependency.
    5. Select 1. Library dependency in the drop down menu.
    6. From the Choose Library Dependency screen choose the com.android.support:appcompat-v7:{version}.
    7. Click OK.
  7. Sync project with gradle files.

You can now use the Adyen library in your Android application.