The file system structure and the underlying APIs vary from platform to platform. Environment.CurrentDirectory
exists on iOS, but it does not exist on Android nor on UWP, so it will have a null value, and therefore it won't be able to find the file.
Because the file system is so different between platforms it is recommended you abstract environment level file accessing code to platform specific projects instead of shared ones - although you could make it work with compiler directives.
#if __ANDROID__
var currentPath = Environment.DataDirectory;
#endif
Alternatively, you can experiment getting the current directory from the Directory.GetCurrentDirectory();
method (in the System.IO
namespace)