0
Kotlin Speech recognizer - val cannot be reassigned - please help
Hello community Based on my first question, I want to program a speech recognizer with Kotlin. (in Android Studio) Sadly I have the error, that val "progressbar" as well as "toggle button" cannot be reassigned. On stackoverflow I've found, that I need to create a new function for this, but I am not quite sure. Can you guys help me? Thank you. https://code.sololearn.com/cQ5KlnSelvUQ/?ref=app https://www.sololearn.com/post/1062872/?ref=app
3 Respostas
+ 1
Ananiya Jemberu thats unusual. Here it is:
https://www.sololearn.com/post/1062872/?ref=app
Hope, it works now.
0
The post is not opening can you repost it
0
Peter actually the error is clear. It's showing you have declared it some where else as immutable value you can check it by holding ctrl and clicking on the error `progressBar` maybe you defined it on another file so its better to look at your import
Btw findViewById is deprecated you need to use viewbinding