无法使用Delphi 10.4在Android中加载sqlite库
使用Delphi10.4,我的Android应用程序中出现了一个错误(32位和64位的错误相同) [FireDAC][Phys][SQLite]-314。无法加载供应商库[libsqlite.so或libdb_sql.so]。提示:请检查它是否位于路径或应用程序EXE目录中,并且具有x86位 它在Delphi的早期版本(最新的10.3.3)中运行良好 是在bug上,还是Delphi10.4有什么变化无法使用Delphi 10.4在Android中加载sqlite库,android,sqlite,firemonkey,firedac,delphi-10.4-sydney,Android,Sqlite,Firemonkey,Firedac,Delphi 10.4 Sydney,使用Delphi10.4,我的Android应用程序中出现了一个错误(32位和64位的错误相同) [FireDAC][Phys][SQLite]-314。无法加载供应商库[libsqlite.so或libdb_sql.so]。提示:请检查它是否位于路径或应用程序EXE目录中,并且具有x86位 它在Delphi的早期版本(最新的10.3.3)中运行良好 是在bug上,还是Delphi10.4有什么变化 constructor TBrDataAccess.Create; var AppData
constructor TBrDataAccess.Create;
var
AppDataName: string;
DBExists: boolean;
begin
try
FFDGUIxProvider := 'Console';
AppDataName := TPath.GetDocumentsPath + PathDelim + GetFileName;
DBExists := FileExists(AppDataName);
FConnection:=TFDConnection.Create(nil);
FConnection.Params.Add('DriverID=SQLite');
FConnection.Params.Add('Database=' + AppDataName);
FConnection.Params.Add('OpenMode=CreateUTF8');
FConnection.Params.Add('DateTimeFormat=String');
FConnection.Params.Add('LockingMode=Normal');
FConnection.Params.Add('Synchronous=Normal');
FConnection.Params.Add('BusyTimeout=7500');
FConnection.Params.Add('SharedCache=False');
FConnection.FetchOptions.Mode := fmAll; // Meget vigtig ved SqLite.
FConnection.UpdateOptions.LockWait := True;
FConnection.Connected := true;
if not DBExists
then if FConnection.ExecSQLScalar('pragma schema_version;') = 0
then CreateDb;
except
on E : Exception
do TBrMobileLog.AddLog(TBrLogFileType.LFTDb, 'TBrDataAccess', 'Create', E.Message, True);
end;
end;
尝试在uses子句中包含FireDAC.Phys.SQLiteWrapper.Statunit。 非常感谢您da soft。
现在Sqlite在Android x64下工作。尝试将FireDAC.Phys.SQLiteWrapper.Stat单元包含在uses子句中。