我想在资产文件夹中写入我的 HTML 文件。
请注意,因为我的 HTML 与其他文件/文件夹相关,所以我不能使用个人文件夹。我必须写在
资产/HTML/mycharts.html
[MY WRITING code below return these errors
System.IO.File.WriteAllText("file:///android_asset/myGraphs/BarGraph.html", s);
]
错误
UNHANDLED EXCEPTION: System.IO.DirectoryNotFoundException: Could not find a part of the path "//file:///android_asset/myGraphs/BarGraph.html".
at System.IO.FileStream..ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool,System.IO.FileOptions) <0x00208>
at System.IO.FileStream..ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) <0x00057>
at System.IO.StreamWriter..ctor (string,bool,System.Text.Encoding,int) <0x00087>
at System.IO.StreamWriter..ctor (string,bool,System.Text.Encoding) <0x00037>
at
]