[QUESTION] Val cannot be reassigned
infroz opened this issue · 0 comments
infroz commented
So I've followed the tutorial to the letter but it produces an error which stops it from compiling.
Val's cannot be reassigned
val imageAnalysisConfig = ImageAnalysisConfig.Builder()
.build()
val imageAnalysis = ImageAnalysis(imageAnalysisConfig)
val qrCodeAnalyzer = QrCodeAnalyzer { qrCodes ->
qrCodes.forEach {
Log.d("MainActivity", "QR Code detected: ${it.rawValue}.")
}
}
imageAnalysis.analyzer = qrCodeAnalyzer
It is specifically only mentioning the imageAnalysis val. Ive' tried simply changing this to var, but it produces the same error message.