New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter 19 does not compile #10
Comments
I reverted to Anko version 0.8.3 in AndroidStudio and the demo app code is working now. I don't know if something in Anko changed and demo the broke or if Anko has a bug. I suspect the latter, but am not knowledgeable enough to make that call and possibly send a bug report to Anko developers. |
OK, I figured it out. Lack of nullable values in anko-db #154 in Anko changed the Pair<String, Any> to nullable Pair<String, Any?> which requires similar changes to the function signatures for parseList() and parseOpt(). |
Yeah sorry, that's the thing. I'm updating the book these days to cover changes in Kotlin 1.0.6 and Anko 0.9. Will also update this repository accordingly. Thanks! |
Well, 1.0.X version of a language, these kinds of things are going to happen. The worst part of this issue is the not-very-helpful compiler errors. I would have expected something more like "type mismatch" or, better, "non-nullable type used with nullable parameter". Thanks for the comment and looking forward to the update. |
I finished updating the book, and the new code is on the repo. If you have the digital edition, you'll receive the update soon (may be you did already). Closing this. Thanks! |
I have been following along in the book. When I added the code for Chapter 19, the DatabaseExtensions.kt file will not compile. To ensure that I didn't type something wrong, I got a zip of the Chapter 19 commit and got the same error:
I'm using buildVersonSdk 25.0.0, targetSdkVersion 25, ext.support_version 25.1.0, ext.kotlin_version 1.0.6, ext_anko_version 0.9 in Android Studio. Everything had worked up to the transition from earlier chapters to chapter 19. Since I'm new to Kotlin, I don't have a clue what is wrong or how to fix it.
The text was updated successfully, but these errors were encountered: