Overload resolution ambiguity HashMap.get kotlin

It was a bug with the latest Android SDK 29 release until Google rolled back the update. See https://issuetracker.google.com/issues/139041608.

If you were unfortunate enough to install platforms;android-29 revision 2 before they rolled it back, you'll have to downgrade back to revision 1. You can do this by first uninstalling the package using the $ANDROID_HOME/tools/bin/sdkmanager tool.

sdkmanager --uninstall "platforms;android-29"

Then remove revision 2 from the cache by removing the "platforms;android-29" element containing <major>2</major> from $HOME/.android/cache/sdkbin-1_b735609c-repository2-1_xml:

<remotePackage path="platforms;android-29">
  <!--Generated from bid:5747142, branch:qt-release-->
  <type-details xsi:type="sdk:platformDetailsType">
    <api-level>29</api-level>
    <codename></codename>
    <layoutlib api="15"/>
  </type-details>
  <revision>
    <major>2</major>
  </revision>
  <display-name>Android SDK Platform 29</display-name>
  <uses-license ref="android-sdk-license"/>
  <channelRef ref="channel-0"/>
  <archives>
    <archive>
      <!--Built on: Tue Jul 23 11:56:59 2019.-->
      <complete>
        <size>78259143</size>
        <checksum>c8b1361cc03309a8113de92f93471524fa0c36f7</checksum>
        <url>platform-29_r02.zip</url>
      </complete>
    </archive>
  </archives>
</remotePackage>

Keep the other "platforms;android-29" element with <major>1</major> and then re-install the package:

sdkmanager --install "platforms;android-29"

I ran into the same problem and found a workaround for HashMap and ArrayList: You can instantiate the map as

val map: MutableMap<String, String> = HashMap()

For ArrayList

val list: MutableList<String> = ArrayList()