Problem with webView

I am trying to implement this code using kotlin
but I got errors and the app can’t compile, the same code run fine in a java activity:

Error:(238, 17) Unresolved reference: webViewClient
Error:(265, 43) Unresolved reference: PRINT_SERVICE
Error:(268, 36) Unresolved reference: createPrintDocumentAdapter
Error:Execution failed for task ':app:compileDebugKotlin'.
> Compilation error. See log for more details

The methods are there, I can even navigate to them using android studio but it does not compile

I fix the problem removing the anko library from the module gradle file, removing this line
compile "org.jetbrains.anko:anko-appcompat-v7-coroutines:$anko_version" fixed