When I do import anko.async, AS show error. while import anko.doAsync looks fine, with anko version 0.10.4.
what's the difference between anko.async and anko.doAsync?
There is no async in anko, it is part of coroutines library and used to create new coroutine. doAsync is part of anko-commons and is used to execute task on background thread.
IIRC, doAsync was called async previously. It was renamed as to not conflict with the _kotlinx.coroutines_ function by the same name. So Anko's async is probably deprecated in favor of doAsync, but not removed entirely because of backward compatibility.
Most helpful comment
IIRC,
doAsyncwas calledasyncpreviously. It was renamed as to not conflict with the _kotlinx.coroutines_ function by the same name. So Anko'sasyncis probably deprecated in favor ofdoAsync, but not removed entirely because of backward compatibility.