Getting error while building signed apk in release mode (:app) DHIS2 Capture

Hi,

I am not able to build the release mode signed apk , debug mode is working fine.

image

build variant structure: (not working for dhisRelease)
image

getting below error:
:\build\suni-

*sea1\dhis_android_analytics\src\main\java\dhis2\org\analytics\charts\ChartsRepositoryImpl.kt: (166, 18): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: *
*public fun <T> Array<out TypeVariable(T)>.getOrNull(index: Int): TypeVariable(T)? defined in kotlin.collections*
*public fun BooleanArray.getOrNull(index: Int): Boolean? defined in kotlin.collections*
*public fun ByteArray.getOrNull(index: Int): Byte? defined in kotlin.collections*
*public fun CharArray.getOrNull(index: Int): Char? defined in kotlin.collections*
*public fun CharSequence.getOrNull(index: Int): Char? defined in kotlin.text*
*public fun DoubleArray.getOrNull(index: Int): Double? defined in kotlin.collections*
*public fun FloatArray.getOrNull(index: Int): Float? defined in kotlin.collections*
*public fun IntArray.getOrNull(index: Int): Int? defined in kotlin.collections*
*public fun LongArray.getOrNull(index: Int): Long? defined in kotlin.collections*
*public fun ShortArray.getOrNull(index: Int): Short? defined in kotlin.collections*
*public fun UByteArray.getOrNull(index: Int): UByte? defined in kotlin.collections*
*public fun UIntArray.getOrNull(index: Int): UInt? defined in kotlin.collections*
*public fun ULongArray.getOrNull(index: Int): ULong? defined in kotlin.collections*
*public fun UShortArray.getOrNull(index: Int): UShort? defined in kotlin.collections*
*public fun <T> List<TypeVariable(T)>.getOrNull(index: Int): TypeVariable(T)? defined in kotlin.collections*

@Pablo , probably you can answer this one? :slight_smile:

Hi @besourabh! Not sure why you are getting that error…
I’d say it is related to the kotlin version, you may need to update it so the sdk and app has the same one.

Thanks for the reply @jaime.bosque and @Pablo , the error is coming while building the release version, debug version is running fine without any issue. kotlin versions for sdk and app is “1.4.32”

I did not read that the debug version was running… then it can’t be a problem in kotlin, there must be something wrong in the release configuration. Which version of the app are you trying to build? That kotlin version was changed in december so I’m guessing 2.5.X