Android-nRF-Toolbox project building error

Dear Nordic Team,

We are trying to build Android-nRF-Toolbox version 3.1.3 and Android BLE library 2.5.1 on Android Studio Dolphin | 2021.3.1 Patch 1.

After struggling and setting Android Gradle Plugin Version 7.3.1 and Gradle Version 7.5-rc-1, project sync gives following errors.

> Task :lib_ui:compileDebugKotlin FAILED
e: E:\Nordic_Codes\Android\Nordic-Toolbox\lib_ui\src\main\java\no\nordicsemi\android\ui\view\BatteryLevelView.kt: (36, 30): Unresolved reference: theme
e: E:\Nordic_Codes\Android\Nordic-Toolbox\lib_ui\src\main\java\no\nordicsemi\android\ui\view\BatteryLevelView.kt: (41, 5): Unresolved reference: ScreenSection
e: E:\Nordic_Codes\Android\Nordic-Toolbox\lib_ui\src\main\java\no\nordicsemi\android\ui\view\BatteryLevelView.kt: (42, 9): @Composable invocations can only happen from the context of a @Composable function
e: E:\Nordic_Codes\Android\Nordic-Toolbox\lib_ui\src\main\java\no\nordicsemi\android\ui\view\BatteryLevelView.kt: (43, 13): @Composable invocations can only happen from the context of a @Composable function

We also tried different versions of Android libraries, its platforms, Kotlin etc. but got more errors than above.

Please suggest how can we overcome this problem. 

Otherwise suggest us which last successful versions of Android-nRF-Toolbox and Android BLE library should be use with which version of Android Studio.

Regards,

Parents Reply Children
  • Dear Simon,

    Thanks for your support.

    We are able to build and generate apk for nRF Toolbox v3.1.3. It is installing well on mobile, but after opening when we press UART utility button, app goes crash. We are not able to identify the area of problem.

    We are using ver 3.1.3 so Gradle ver7.4.2 used by us on Android Studio 2022.1.1

    Please suggest what should we do to resolve the problem. 

    Note: App worked fine if we download apk file from Google playstore.

    One more question we have. What is the role of Nordic Gradle plugin for Android v1.2.1 in this code.

    Regard,

Related