I see at least 1 error on DetectInstalledNDKPlatforms: Pos never returns -1. Maybe it should be 0.
function TfrmApkManager.DetectInstalledNDKPlatforms: TStringList;
var
i:integer;
_pos:integer;
_temp:string;
_tempList:TStringList;
begin
result:=TStringList.create;
result:=FindAllFiles(FAndroidNDK,'libc.so');
if result.count=0 then begin
MessageDlg(format('No files with name <libc.so> found in NDK-path <%s>. Did you install the android NDK and setup the correct NDK-Path?',[FAndroidNDK]),mtWarning, [mbOK], 0);
exit;
end;
_tempList:=TStringList.create;
try
_tempList.Duplicates:=dupIgnore;
_tempList.sorted:=true;
for i:=0 to result.count-1 do begin
_pos:=pos('platforms\android-',result[i]);
if _pos=-1 then continue; //<<<<<<<<<<<
_temp:=result[i];
delete(_temp,1,_pos+17);
_pos:=pos(PathDelim,_temp);
_temp:=copy(_temp,1,_pos-1);
_tempList.add(_temp);
end;
result.assign(_tempList);
finally
_tempList.free;
end;
end;
I think the error I have found is related to this, the folders shown in the list is all but from "platforms\android" folder, instead of the contrary. Maybe the only dirs which should be in this list are "platforms\android" and their subdirs.