When using SDK version higher than 29 In ListDetailActivity.kt expression
list = intent.getParcelableExtra(MainActivity.INTENT_LIST_KEY) as TaskList
no longer runs because of the type mismatch.
Needs to be changed to:
list = intent.getParcelableExtra<TaskList>(MainActivity.INTENT_LIST_KEY) as TaskList
Welcome to the forums. Can I ask what edition of Android Apprentice you’re using?
I ask because In the 4th edition the expression is
list = intent.getParcelableExtra(MainActivity.INTENT_LIST_KEY)!!
With this I can build the final project for chapter 9 using SDK 30 in Android Studio.
My apologies. I only noticed the date of your original post after my reply. I believe you were using the 3rd edition at the time. That would explain the issue here.
This should no longer occur in the 4th edition. But please let us know if that’s not the case.