# Why toDouble() or even toInt() functions not available in android studio (kotlin)? Do I have to import a specific file to make them available?

**URL:** <https://discuss.kotlinlang.org/t/why-todouble-or-even-toint-functions-not-available-in-android-studio-kotlin-do-i-have-to-import-a-specific-file-to-make-them-available/17593>\
**Category:** Android\
**Created:** [May 11, 2020, 2:11am UTC](https://discuss.kotlinlang.org/t/why-todouble-or-even-toint-functions-not-available-in-android-studio-kotlin-do-i-have-to-import-a-specific-file-to-make-them-available/17593 "2020-05-11T02:11:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarz.ever](https://avatars.discourse-cdn.com/v4/letter/t/ed655f/32.png) [@tarz.ever](https://discuss.kotlinlang.org/u/tarz.ever)\
**Post date:** [May 11, 2020, 2:11am UTC](https://discuss.kotlinlang.org/t/why-todouble-or-even-toint-functions-not-available-in-android-studio-kotlin-do-i-have-to-import-a-specific-file-to-make-them-available/17593/1 "2020-05-11T02:11:48Z")

</div>

Why toDouble() or even toInt() functions not available in android studio (kotlin)? Do I have to import a specific file to make them available?

---

<div class="post-metadata">

**Author:** ![daveTheCoder](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@daveTheCoder](https://discuss.kotlinlang.org/u/daveTheCoder)\
**Post date:** [May 11, 2020, 3:35am UTC](https://discuss.kotlinlang.org/t/why-todouble-or-even-toint-functions-not-available-in-android-studio-kotlin-do-i-have-to-import-a-specific-file-to-make-them-available/17593/2 "2020-05-11T03:35:43Z")

</div>

What makes you think those functions are not available? Can you provide a simple code example?

---

<div class="post-metadata">

**Author:** ![BottomTurn](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@BottomTurn](https://discuss.kotlinlang.org/u/BottomTurn)\
**Post date:** [May 11, 2020, 12:03pm UTC](https://discuss.kotlinlang.org/t/why-todouble-or-even-toint-functions-not-available-in-android-studio-kotlin-do-i-have-to-import-a-specific-file-to-make-them-available/17593/3 "2020-05-11T12:03:13Z")

</div>

Are you using them on some var that have the right explicit type specification? if your variable 2 you are looking for is supposed to be a String, and you convert variable 1 toInt or toDouble, then it might not be available??
