delphi 安卓程序如何读取外部配置文件

1)编辑一个config.txt文件,填写配置系统。

2)有外部加载文件时,安卓发布需要另行指定文件发布目录位置

比如加载config.txt需要在

首先利用Project->Deployment,打开发布文件窗口,增加要发布的文件。
然后设置文件发布的位置Remote Path,填写为assetsinternal

3)uses System.IOUtils

在代码中取得文件:
procedure TForm19.Button1Click(Sender: TObject);
var
p: string;
begin
p := TPath.Combine(TPath.GetDocumentsPath, 'config.txt');
memo1.Lines.LoadFromFile(p);
end;

原文地址:https://www.cnblogs.com/westsoft/p/5962650.html