Kotlin BLE Library

Hi,
I am busy researching the best ways to communicate with Ble devices through an app. I added the dependencies of Nordics Kotlin Ble library into a new kotlin project and then realized that classes like BleScanner(Context) and BleScanResultAggregator do not exist (even though these were the classes used to display how the "Ble Scanner" implementation should work). I also downloaded all the code from the Kotlin-BLE-Library and tried to open the app_client project but got the error: 

  • No matching variant of no.nordicsemi.android.gradle:plugins:1.11.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.5' but:

Is there any documentation online to using this library?
Can anyone help me fix this error/get started with the SDK?

Parents
  • Hello,

    I just spoke to our main developers on the Kotlin BLE library, and they state:
    We don't have dependency: no.nordicsemi.android.gradle:plugins:1.11.1. We have only no.nordicsemi.android.gradle:version-catalog:1.11.1 where we put all our plugins as dependencies.

    They also tested the nRF-Toolbox from main without any issue.

    Is this a fresh environment you are setting up, or is this something you have been working with before in other projects, which you are now adding the nRF-Toolbox and Kotlin BLE library to?

    Best regards,
    Karl

  • Thanks for the reply.
    I simply downloaded the latest release source code and opened it up in Android Studio and received this error upon syncing the Gradle file.
    I got the exact same error when cloning the Kotlin-BLE-Library repo

  • Hello,

    mike_scriven said:
    Thanks for the reply.

    No problem at all, we are happy to help! :) 

    mike_scriven said:
    I simply downloaded the latest release source code and opened it up in Android Studio and received this error upon syncing the Gradle file.
    I got the exact same error when cloning the Kotlin-BLE-Library repo

    I have discussed this further with our developers and they gave this a try and were able to reproduce your issue when they set JAVA to 11, but our application only support JAVA 17.

    If you are currently using JAVA 11 please switch to JAVA 17 and see if this resolves your issue.

    Best regards,
    Karl

Reply
  • Hello,

    mike_scriven said:
    Thanks for the reply.

    No problem at all, we are happy to help! :) 

    mike_scriven said:
    I simply downloaded the latest release source code and opened it up in Android Studio and received this error upon syncing the Gradle file.
    I got the exact same error when cloning the Kotlin-BLE-Library repo

    I have discussed this further with our developers and they gave this a try and were able to reproduce your issue when they set JAVA to 11, but our application only support JAVA 17.

    If you are currently using JAVA 11 please switch to JAVA 17 and see if this resolves your issue.

    Best regards,
    Karl

Children
Related