I am get this (System.ArgumentNullException: Value cannot be null.
Parameter name: stream) exception when reading file in Xamarin forms.
Please can you help on this.
Ensure that you've set the Build Action to EmbeddedResource with the json file .
BTW, You could retrieve the resource names to find the json file path.
foreach(var res in assembly.GetManifestResourceNames())
System.Diagnostics.Debug.WriteLine("found resource: " + res);
var stream = assembly.GetManifestResourceStream(res);
Refer Embedded Images.
As your log says your stream object is null that means that the line loading the stream returns null which means that either the resourceID you pass is wrong or the resource is not in the same assembly as your MapPage where you're loading assembly from.
Things to do/test:
Double check that RevealDriverApp.MapStyle.json is the correct ID
I also think you don't need the $ in front, just pass the string. Perhaps that's already the issue.
Check if the assembly is the same. If not you can also just use Assembly.Load("YourAssemblyName") to get the correct one.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies