Recent

Author Topic: Using LazToApk  (Read 35407 times)

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Using LazToApk
« Reply #30 on: July 01, 2015, 10:17:20 pm »
Nothing has changed. The output message is:

Code: [Select]
Failed building C:\laztoapk\projects\project1\project1android.lpi


C:\laztoapk\projects\project1\android>REM pause

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 255
    • Fresh sound.
Re: Using LazToApk
« Reply #31 on: July 02, 2015, 06:24:32 am »
More info please.
You could start Lazarus and open the project1android.lpi.
Then compile as normal an send me the error/waning messages.
Linux Mint 20.3, Lazarus 2.3, Windows 10, Delphi 10.3 Rio, Delphi 11.1 Alexandria

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Using LazToApk
« Reply #32 on: July 02, 2015, 07:36:58 am »
Image attached.

The error occurs outside the app, in the batch file called "android\build_debug_apk.bat". Running from Lazarus makes no difference.

Simply run the app and press the manual construction buttons and you will see the error.

Te error occurs here (file does not exist):
Code: [Select]
procedure TfrmApkManager.btnCreateApkFileClick(Sender: TObject);
var
  _targetfilename:string;
begin
  if FProjectDir = '' then begin
    SelectDirectoryDialog1.Title := 'Select project directory';
    if not SelectDirectoryDialog1.Execute then exit;
    FProjectDir := SelectDirectoryDialog1.FileName + PathDelim;
  end;
  _targetfilename:=FProjectDir + 'android\bin\'+FProjectName+'.apk';
  RunScript(FProjectDir + 'android\build_debug_apk.bat', False);
  // Now the error occurs <<<<<<<<<<<<<<<<<<<<
  if not FileExistsUTF8(_targetfilename) then begin
    MessageDlg(format('Could not build the Android apk <%s>. See batch file output to analyze the problem.',[_targetfilename]), mtWarning, [mbOK], 0);
    // The file does not exist <<<<<<<<<<<<<<<<<
    exit;
  end;
  btnInstallAPK.Enabled:=true;

  if pgcMain.ActivePage <> tabManual then Exit;

  BringToFront;
  btnInstallAPK.SetFocus;
end;     

The only APK file which exists in this folder is "project1-unsigned.apk" in BIN subfolder.
« Last Edit: July 02, 2015, 08:31:27 am by typo »

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 255
    • Fresh sound.
Re: Using LazToApk
« Reply #33 on: July 02, 2015, 09:20:20 am »
Hi,
of course this will not work! You are using a very,very old version of laztoapk.
Where an when did you get that version ?


Correct version at the moment is :
http://sourceforge.net/projects/laztoapk/files



I really recommend you to delete your current folder laztoapk and start again!!!!!!
« Last Edit: July 02, 2015, 09:23:53 am by DelphiFreak »
Linux Mint 20.3, Lazarus 2.3, Windows 10, Delphi 10.3 Rio, Delphi 11.1 Alexandria

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Using LazToApk
« Reply #34 on: July 02, 2015, 02:22:31 pm »
Which is exactly the file I should download?

Please inform the exact link.

EDIT:
No, I have downloaded from these files, only the source code I got in another place. Where should I get the updated one?
« Last Edit: July 02, 2015, 02:27:51 pm by typo »

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 255
    • Fresh sound.
Re: Using LazToApk
« Reply #35 on: July 02, 2015, 03:04:04 pm »

Here is the setup. The current version is 0.9.0.31. You must install it.
http://sourceforge.net/projects/laztoapk/files/latest/download?source=directory

Only downloading the sources and compiling them is not enough!
Linux Mint 20.3, Lazarus 2.3, Windows 10, Delphi 10.3 Rio, Delphi 11.1 Alexandria

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Using LazToApk
« Reply #36 on: July 02, 2015, 03:15:19 pm »
Do the sources come in this download?

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 255
    • Fresh sound.
Re: Using LazToApk
« Reply #37 on: July 02, 2015, 03:16:13 pm »
No, the changes we did yesterday (_pos=-1) is not included in this download.
Linux Mint 20.3, Lazarus 2.3, Windows 10, Delphi 10.3 Rio, Delphi 11.1 Alexandria

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Using LazToApk
« Reply #38 on: July 02, 2015, 03:23:02 pm »
But the sources are included in this installation or not?

Well, I have just resintalled everything and have the same error, NDK instllation not found. By the binary generated by sources -- although they are not updated -- this error does not occur.
« Last Edit: July 02, 2015, 05:47:44 pm by typo »

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 255
    • Fresh sound.
Re: Using LazToApk
« Reply #39 on: July 02, 2015, 11:16:17 pm »
Hey man, I told you to download 0.9.0.31!
The pdf with all instructions available also at sourceforge.net on the first page says:

06.Mai 2015 Version 0.9.0.31.
Do you think then the version 0.9.0.31 does contain changes from the 30.Juni ??


Please read my instruction manual, I have spent a lot of time to get it correct!!!!!! http://sourceforge.net/projects/laztoapk/files/?source=navbar
Linux Mint 20.3, Lazarus 2.3, Windows 10, Delphi 10.3 Rio, Delphi 11.1 Alexandria

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Using LazToApk
« Reply #40 on: July 02, 2015, 11:23:54 pm »
Hey man, I do have downloaded  0.9.0.31 and the error exists.

BTW, it does not exist in previous versions.

BTW, I do acknowledge your efforts to write the manual.

You still don't mention how to get the 0.9.0.31 version source code.
« Last Edit: July 03, 2015, 12:02:53 am by typo »

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 255
    • Fresh sound.
Re: Using LazToApk
« Reply #41 on: July 03, 2015, 04:36:23 pm »
Hi,

the easiest way to get the current sources (0.9.0.32 which contains your suggestions about _pos=-1 and MemoryLeaks) can be
downloaded from here: http://sourceforge.net/p/laztoapk/svn/HEAD/tree/

Click onto the "Download snapshot" and you will get a zip-file with all the files.
Linux Mint 20.3, Lazarus 2.3, Windows 10, Delphi 10.3 Rio, Delphi 11.1 Alexandria

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Using LazToApk
« Reply #42 on: July 03, 2015, 04:39:01 pm »
Thanks.

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Using LazToApk
« Reply #43 on: July 03, 2015, 04:51:50 pm »
It still does not find NDK installation, which was made by itself.

dbaxter

  • New Member
  • *
  • Posts: 13
Re: Using LazToApk
« Reply #44 on: July 14, 2015, 08:00:28 pm »
I, too, am struggling to get past the 'NDK platform not found' message. The ini file is as described here and have followed the tutorial steps. Even installed the 9.0.32 version. Finding the SDK worked OK.

 

TinyPortal © 2005-2018