I am not able to load files using File() from java.io in my kotlin multiplatform project. It compiles fine but when I include the build .aar file in my android project, it gives no such directory exists error. Is it not possible to load a file in a KMP project?
c
Casey Brooks
06/10/2020, 3:57 PM
A “no such directory exists” error indicates that the File apis are working fine. It’s just that the file cannot be found. How are you loading the file? On Android, pretty much all file operations need to be relative to
I was loading the file in kotlin multiplatform library, not android. But hey, I solved the issue by passing the filedescriptor from my android project to KMP.