NXP lib not working on Android 7+ due to missing Apache HTTP client

Forum / MIFARE SDK / NXP lib not working on Android 7+ due to missing Apache HTTP client

  • 8. September 2020 at 12:40
    The title says it all. The NXP lib (v1.7) still uses the very old (and removed) Apache HTTP client to communicate. This requires the developers to add the removed lib to the Android build process (see https://developer.android.com/about/versions/marshmallow/android-6.0-changes#behavior-apache-http-client) which is bad if we consider that Android 11 is just around the corner...

    Stack trace:

    `Caused by java.lang.ClassNotFoundException: Didn't find class "org.apache.http.params.BasicHttpParams" on path: DexPathList[...]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at com.nxp.nfclib.ι$iF$1.run(:752)`

    Also, the lib leaks memory because the Activity is saved in the `NxpNfcLib` instance that is saved as a static variable, so this code is just a mess.
    + 2  |  - 0

    Re: NXP lib not working on Android 7+ due to missing Apache HTTP client

    8. September 2020 at 12:46
    Hi Norbert,

    Sorry, but I used the 1.7 version in test apps and there is no explicit reference to Apache HTTP required. But you are right, this was used in old releases of TapLinx. I assume there must be an incorrect setting in your Gradle file.

    The TapLinx team
    + 0  |  - 0
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.