So I have a really simple project:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
    val bundle = ActivityOptionsCompat.makeCustomAnimation(applicationContext, android.R.anim.fade_in, android.R.anim.fade_out).toBundle()
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)
    val myObj = File("C:\\Users\\user\\Desktop\\k.txt")
    val myReader = Scanner(myObj)
}
and I have a "k.txt" file on my desktop.
Whenever val myReader = Scanner(myObj) comes it throws a:
Caused by: java.io.FileNotFoundException: C:\Users\user\Desktop\k.txt (No such file or directory)
why is that?
thanks for any help!
 
     
    