Menu

installing alpha_006_experimental; problems with directory structure etc.

2014-02-26
2021-02-18
  • Erkka Lehmus

    Erkka Lehmus - 2014-02-26

    Hello,

    LazToApk seems like extremely interesting way to get started with Android development with lazarus. I downloaded the installer yesteday and spent the night trying to set the whole thing up - alas, with no success. I'm sorry, but because of creeping sleep deprivation I failed to take proper notes. But here are some questions and observations;

    • First run of the LazToApk-installer succesfully downloaded ndk.zip, sdk.zip and laz4android-XXXXX.7h but then there were some errors. I went to investigate, and found that directory \latztoapk\3rdparty\ contained only a file create_folder.txt, which is 0 bytes. So I figured that for some reason it failed to extract the archives. Reading Lazarus and Android-2.pdf I went on manually creating the subdirectories and extracting packages.

    • At this point I was bit confused, as the Lazarus and Android-2.pdf says:
      3.) download laz4android-41139.7z to \laztoapk\downloads and then unpack to \laztoapk\laz4android
      but elsewhere it refers to directory \laztoapk\3rdparty\laz4android

    so, to be sure, I created both \laztoapk\laz4android and \laztoapk\3rdparty\laz4andoid, extracting files to both places.

    After that I managed to run LazToApk and to configure the paths as needed. Only that I figured that path maybe the sdk path should be laztoapk\3rdparty\sdk\android-sdk-windows\ instead of plain laztoapk\3rdparty\sdk (the pdf file suggests using this shorter directory path, but at least for me it didn't work)

    • Well, after getting the paths correctly set up (I hope so), I found that button "start SDK-manager" was still grayed out - even after restarting LaztoApk. I went to start sdk-manager manually and succesfully downloaded and istalled the packages according to the pdf-manual.

    • Restarting LaztoApk after that now shows correct paths and a SDK-build tool. Fine. Now, I'm sorry, I don't remember if it was possible to launch AVD-manager from LazToApk, or if I did it manually, but anyhow I managed to set up an emulator, and got it up and running.

    • from this on I was more sleepy than able to think clearly. But it is possible to start IDE from LaztoApk, and it has package "Custom Drawn" installed to IDE. I did that at some point, can't remember exactly. Although there might be some unclarities with ide configurations; I already have an old stable version of Lazarus, and version 1.3 from SVN. It now appears that both the 1.3 version and 1.1 version launched from laztoapk\3rdparty\laz4android have the custom drawn package installed to the ide. This might be my problem, but unfortunately my brain is too bogged to get it sorted out.

    • Anyhow, at some point of testing I realized that \laztoapk\projects\test1\android\build_app.bat fails because it complains about having "c:\program files..." in the start of the installation path. I manually edited the .bat file and added quatation marks around the whole lazbuild.exe -path. That worked a bit better, but then there were other errors too. Browsing through some other configuration files I realized that they had a directory path "C:\programme..." in them - althought I don't have such a directory on my computer. So I thought that maybe that directory path is mistakenly still hardcoded somewhere in scripts or LaztoApk code. I changed my own directory structure so that laztoapk is now in c:\programme\laztoapk ...

    • OK, now it only is that when I launch the lazarus IDE from laztoapk, all the directories seem to be correct. Yet it fails to compile anything, complaining "lclproc.pas(37,3) Fatal: Can not find unit Win9xWsManager used by LCLProc." - well, I have the needed .pp file in "C:\programme\laztoapk\3rdparty\laz4android\fpc\2.7.1\source\packages\winunits-base\src", and in Lazarus options the lazarus directory is set to "C:\programme\laztoapk\3rdparty\laz4android\" and fpc source directory is "$(LazarusDir)\fpc\$(FPCVer)\source"

    At this point I give up, sorry to spam the forum with a lengthy post - as I have a vague feeling that some of the errors might be on my side. Anyhow, all the help would be greatly appreciated. What I'm possibly doing wrong, what to check to get it properly working?

     

    Last edit: Erkka Lehmus 2014-02-26
  • DelphiFreak

    DelphiFreak - 2014-03-01

    Hello Erkka,

    thank you for your detailed report and the time you took to investigate the different problems.

    The correct path should be \laztoapk\3rdparty\laz4android. I will correct this in the tutorial.

    I will also correct the issues about this stupid language dependent program-files folder. I don't know how much trouble this already has created in the computer industry!!

    Now about your case:

    I have the used/tested my tutorial/laztoapk on windows xp sp3. I assume you are using windows 7 which has some "addidtional" traps for you.
    You mentioned that you have a second installation of lazarus somewhere on your machine. It is possible that this is the trouble maker.

    If you want to be absolute independent, I recommend you the following:

    1.) setup a virtual machine with win7.
    2.) turn off in windows this "virtualstore" stuff.
    3.) and then install laztoapk inside the virtual machine.

    Regards,
    Sam

     
  • Erkka Lehmus

    Erkka Lehmus - 2014-03-01

    Hey, thanks for the reply!

    I'm also running windows xp. So I suspect that the main problem might be with conflicting FPC versions. As, I have a stable release of Lazarus, shipped with FPC version 2.6.2, and laz4android comes with FPC version 2.7.1. There might me something wrong with my system path settings. Unfortunately I don't have time to investigate further right now. I'll try to report back after couple of days.

     
  • gdsg gres

    gdsg gres - 2021-02-02

    yes this looks very cool for my Mini militia APK website but i am also facing the same issues with the previous feature that i used but can you insure that it will be not possible in this feature an d it will work good for me.

     
  • R S UPADHYE

    R S UPADHYE - 2021-02-18

    LaztoApk is useful and easy .When will it update .

     

Log in to post a comment.