Build error with sample application TapLinxTestMaven

Forum / MIFARE SDK / Build error with sample application TapLinxTestMaven

  • 2. August 2018 at 16:15
    Hi,

    I have downloaded the application TapLinxTestMaven that came with the PDF "Starting Development with TapLinx SDK" (https://www.mifare.net/wp-content/uploads/2016/08/AN11876-Starting-Development-with-TapLinx-SDK.pdf) but am getting this error when trying to build it:
    (I'm skipping the full stack trace here)

    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.

    Caused by: com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /home/joel/.gradle/caches/transforms-1/files-1.1/nxpnfcandroidlib-1.4.1.aar/cf6592495d37dffc30bd006eba0f42f7/jars/classes.jar

    Caused by: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /home/joelc/.gradle/caches/transforms-1/files-1.1/nxpnfcandroidlib-1.4.1.aar/cf6592495d37dffc30bd006eba0f42f7/jars/classes.jar

    Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.

    Caused by: java.lang.ArrayIndexOutOfBoundsException

    Anyone come across this before? I didn't change anything so the Test app is exactly as I downloaded it.

    Any advice appreciated.

    Thanks
    Joel
    + 0  |  - 0

    Re: Build error with sample application TapLinxTestMaven

    3. August 2018 at 11:13
    Hi Joel

    I rebuilt the project TapLinxTestMaven today and I can verify your observation! I also get the DexArchiveBuilderException. This must be checked.

    The fast solution for you: please use the approach to use TapLinx as AAR library. The AN explains how to include a ARR into your project.

    I will check this issue and come back if it is fixed.

    The TapLinx team

    + 0  |  - 0

    Re: Build error with sample application TapLinxTestMaven

    6. August 2018 at 17:46
    Hi,

    Thanks for looking into this. I seem to be getting the same error using TapLinx as AAR library. Please let me know if you tested this too and if it worked for you?

    Thanks
    Joel
    + 0  |  - 0

    Re: Build error with sample application TapLinxTestMaven

    7. August 2018 at 9:51
    Hi Joel

    I use Android Studio 3.1.3 and the dev team uses 3.0.1. The issue does not raise at dev team. Therefore, I assume it has to do with the newest version of my AS. Which version do you use?

    The TapLinx team

    + 0  |  - 0

    Re: Build error with sample application TapLinxTestMaven

    7. August 2018 at 13:08
    Hi Joel

    A short addendum: yes, there is an issue in the current release of TapLinx 1.4.1. The dev team is working on a solution.

    The TapLinx team

    + 0  |  - 0

    Re: Build error with sample application TapLinxTestMaven

    8. August 2018 at 12:31
    Hi Joel

    An intermediate update: the team has localized the issue in the new tool release. A workaround is, to use an older version of build tools until the issue is fixed finally. You should change the tool version in your Gradle file like this:



    The TapLinx team
    Attachments:
    You must be logged in to view attached files.

    + 1  |  - 0

    Re: Build error with sample application TapLinxTestMaven

    8. August 2018 at 14:33
    Thanks, that works great!
    + 0  |  - 0

    Re: Build error with sample application TapLinxTestMaven

    18. April 2019 at 8:46
    Hi,

    I've got the same problem and downgrading to 3.0.1 give me this error :
    > Failed to notify project evaluation listener.
    > javax/xml/bind/annotation/XmlSchema

    If you have any advice, I would be grateful.
    + 0  |  - 0

    Re: Build error with sample application TapLinxTestMaven

    18. April 2019 at 9:25
    Hi Jérôme,

    For me it seems that you have an incompatiblty in your setup, but it is not a TapLinx issue.

    The evolution of Android Studio libraries is quite high. To load an AS project, written with older libraries requires to adjust the libraries and its versions. I recommend starting with a skeleton app with your current AS version and default libraries and insert the NFC capabilities line by line. You will find such skeleton in the AN “Starting Development with TapLinx SDK”. Next, I would insert only the interface of the MIFARE or NTag product you want to use in your app (and not everything like the sample app). A lot of short examples how to authenticate, read and write files for a MIFARE Classic, DESFire and Plus you will find in the forum.

    The TapLinx team

    + 0  |  - 0
Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.