Lazarus

Installation => PDAs and Smartphones => Topic started by: nasa on June 22, 2017, 04:23:09 pm

Title: LazToAPK on windows 10
Post by: nasa on June 22, 2017, 04:23:09 pm
Someone installed laztoapk on Windows 10 ?

I could not get it running

it can not find android ndk, android sdk and even java JDK.

i have changed the paths with no sucess

thanks
Title: Re: LazToAPK on windows 10
Post by: Handoko on June 22, 2017, 06:33:56 pm
If I remember correctly, when installing laztoapk, you will be asked to down load ndk, sdk and jdk. Did you skip them?
Title: Re: LazToAPK on windows 10
Post by: Handoko on June 22, 2017, 06:41:54 pm
Oh, I was wrong. That is laz4android. If you're a beginner try laz4android, it is easier. Or try LAMW.

To make LazToApk works, you have to follow the instruction "Lazarus and Android.pdf":
https://sourceforge.net/projects/laztoapk/files (https://sourceforge.net/projects/laztoapk/files)

To learn more about Lazarus Android programming:
http://forum.lazarus.freepascal.org/index.php/topic,33487.msg217112.html#msg217112 (http://forum.lazarus.freepascal.org/index.php/topic,33487.msg217112.html#msg217112)
Title: Re: LazToAPK on windows 10
Post by: nasa on June 27, 2017, 02:15:00 pm
Ok i could make it run on Windows 10 following the Lazarus and Android.pdf

It Builds the Project, create the Keys, builds the APK and install on device

But when i try to run the app on device it pops the message "Application has stopped"

My Device: Samsung Galaxy S5
Android: 6.0.1
LaztoApk: 0.9.0.37
NDK-Plataform: 4.1.2 (API 16)
SDK Build-tool: 26.0.0
JDK: 1.8.9.131

Thanks
Title: Re: LazToAPK on windows 10
Post by: Handoko on June 27, 2017, 02:30:09 pm
LazToApk and Laz4Android have issue with Android 5 and above. It has been discussed here, you can try to search the threads if you want to know more. If I remember correctly the problem was the CustomDrawn package (which used by LazToApk and Laz4Android) has compatibility issue with Android.

You can try LAMW, it is actively developed and the developer is very nice and helpful.
Title: Re: LazToAPK on windows 10
Post by: mpknap on February 25, 2020, 07:00:16 pm
Someone installed this lately? Are the links up to date? Because it doesn't install correctly, something doesn't download, maybe GRADLE ...
https://sourceforge.net/projects/laztoapk/files/
Title: Re: LazToAPK on windows 10
Post by: WimVan on March 06, 2020, 09:38:12 am
I tried it too and got some problems with downloads.
What I did.
1) rename "downloads"-folder itn laztoapk to fe "test"
2) Normaly, while installing laztoapk next zips are donwloaded, but some of them aren't.
So search for them on the internet, download the zips to "test" and rename them to the name required from laztoapk. namely
3) Uninstall laztoapk
4) rename "test" to "downloads"
5) Run setup laztoapk again.  You'll see that no downloads are no more done, the zip-files are already available in the downloads-folder
Title: Re: LazToAPK on windows 10
Post by: DelphiFreak on March 08, 2020, 04:33:00 pm
Hi,

could you please try the new setup v0.9.0.42.

https://sourceforge.net/projects/laztoapk/files/setup_laztoapk_v0_9_0_42.exe/download

As Handoko mentioned I had to change some links in the setup script from http to https. (located in file https://sourceforge.net/p/laztoapk/svn/HEAD/tree/trunk/install/laztoapk.iss

Please let me know it worked, so I can delete setup with version 41 from download page.

Note: I did not do any changes to laztoapk executable ( even the version no of the executable was not updated, so it might still show 41 in the caption).
I only did changes to the setup-script for the https stuff.
Title: Re: LazToAPK on windows 10
Post by: DelphiFreak on March 08, 2020, 04:35:08 pm
And I am always glad if some one constributes some input.

e.g. If someone successfully ran a configuration, please let me know so I can update this wiki

https://sourceforge.net/p/laztoapk/wiki/Home/ (https://sourceforge.net/p/laztoapk/wiki/Home/)
Title: Re: LazToAPK on windows 10
Post by: WimVan on March 11, 2020, 08:04:07 am
Hello,

I tried installing laztoapk and for as far the installation, all runs well BUT,
When I try opening the application, I always sees in the log that SDk build tool and NDK is not found.
Using path-button I see that when I enter the path to the SDK-package and hit 'Find' the application returns 2 possible paths. 
In the listbox, you then have to click on the found paths ...  Doing so still returns the error that SDK build tools can't been found.
I have the same problem with NDK.  ADV-button returns exactly the same problem as for the SDK-Build tools.
I followed all the defaults presented by Laztoapk while installing it.

What did I wrong ?

Wim
Title: Re: LazToAPK on windows 10
Post by: DelphiFreak on March 11, 2020, 07:41:57 pm
Hello WimVan,

did you follow exactly the installation as shown in this video ? https://netcologne.dl.sourceforge.net/project/laztoapk/01_Install%20laztoapk.mp4 (https://netcologne.dl.sourceforge.net/project/laztoapk/01_Install%20laztoapk.mp4)

See video at 2:37m. If you selected the wrong items, then it will not work.

The method "DetectInstalledSDKBuildTools" at line 537
https://sourceforge.net/p/laztoapk/svn/HEAD/tree/trunk/source/apkmanagermain.pas#l537 (https://sourceforge.net/p/laztoapk/svn/HEAD/tree/trunk/source/apkmanagermain.pas#l537)

Search's for the files "dx.bat".
Looks like this file is not there.

Regards,
Sam
Title: Re: LazToAPK on windows 10
Post by: WimVan on March 16, 2020, 08:23:41 am
I cleaned up all concerning laztoapk using uninstall.  Then I cleaned the register ... where some keys were found.
Then I reinstalled all ...
Now succesfull.

Thanks.

Title: Re: LazToAPK on windows 10
Post by: Seenkao on March 29, 2020, 02:00:28 pm
Извиняюсь что на русском.
 
Зачастую достаточно удалить *.lpi файл.

А тут я мучал Lazarus чтоб создать рабочий APK.
https://youtu.be/4oxssDB3JJE - программы, которые нужны или которые использовал
https://youtu.be/3tB_5mA2rO0 - и само создание APK-файла.
Title: Re: LazToAPK on windows 10
Post by: kybio on November 08, 2021, 03:12:19 am
Problem in Windows 10, building APK...


Code: [Select]
[color=#444444][font=verdana, sans-serif][size=0px]Mensagens, Dicas: 2[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Verbose: Selected chip architecture: armeabi[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Verbose: Taking libraries from folder: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\libs\armeabi[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Verbose: Found library: libcontrols.so[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Note: Unidade duplicada "controls" em "controls", orphaned ppu "c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\obj\controls\controls.o"[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Note: Unidade duplicada "controls" em "LCLBase 2.0.0.4", ppu="c:\laztoapk\downloads\laz4android2.0.0\lcl\units\arm-android\controls.ppu", source="c:\laztoapk\downloads\laz4android2.0.0\lcl\controls.pp"[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Compilar projeto, SO: android, CPU: arm, Alvo: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\libs\armeabi\libcontrols.so: Sucesso[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Building APK (Ant)... : Código saída 1, Erros: 88[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: Buildfile: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\build.xml[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [copy] Copying 7 files to c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\src\com\example\appclockdemo1\android-24[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -check-env:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:  [checkenv] Android SDK Tools Revision 25.2.5[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:  [checkenv] Installed at c:\laztoapk\downloads\android-sdk-windows[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -setup:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Project Name: AppClockDemo1[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:   [gettype] Project Type: Application[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -pre-clean:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: clean:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:    [delete] Deleting directory c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\bin[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:    [delete] Deleting directory c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\gen[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [getlibpath] Library dependencies:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [getlibpath] No Libraries[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:    [subant] No sub-builds to iterate on[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -set-mode-check:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -set-debug-files:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -check-env:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:  [checkenv] Android SDK Tools Revision 25.2.5[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:  [checkenv] Installed at c:\laztoapk\downloads\android-sdk-windows[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -setup:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Project Name: AppClockDemo1[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:   [gettype] Project Type: Application[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -set-debug-mode:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -debug-obfuscation-check:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -pre-build:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -build-setup:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [getbuildtools] Using latest Build Tools: 29.0.3[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Resolving Build Target for AppClockDemo1...[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [gettarget] Project Target:   Android 7.0[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [gettarget] API level:        24[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] ----------[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Creating output directories if needed...[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [mkdir] Created dir: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\bin[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [mkdir] Created dir: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\bin\res[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [mkdir] Created dir: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\bin\rsObj[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [mkdir] Created dir: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\bin\rsLibs[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [mkdir] Created dir: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\gen[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [mkdir] Created dir: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\bin\classes[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [mkdir] Created dir: c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\bin\dexedLibs[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] ----------[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Resolving Dependencies for AppClockDemo1...[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [dependency] Ordered libraries:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [dependency] [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [dependency] ------------------[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] ----------[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Building Libraries with 'debug'...[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:    [subant] No sub-builds to iterate on[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -code-gen:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [mergemanifest] Merging AndroidManifest files into one.[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [mergemanifest] Manifest merger disabled. Using project manifest only.[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Handling aidl files...[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [aidl] No AIDL files to compile.[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] ----------[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Handling RenderScript files...[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] ----------[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Handling Resources...[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [aapt] Generating resource IDs...[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] ----------[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:      [echo] Handling BuildConfig class...[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [buildconfig] Generating BuildConfig class.[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -pre-compile:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: -compile:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [javac] Compiling 9 source files to c:\laztoapk\downloads\laz4android2.0.0\config\onlinepackagemanager\packages\LAMW\demos\GUI\AppClockDemo1\bin\classes[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [javac] error: Source option 5 is no longer supported. Use 7 or later.[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic:     [javac] error: Target option 5 is no longer supported. Use 7 or later.[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: BUILD FAILED[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: c:\laztoapk\downloads\android-sdk-windows\tools\ant\build.xml:716: The following error occurred while executing this line:[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: c:\laztoapk\downloads\android-sdk-windows\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: [/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: Total time: 1 second[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Panic: ferramenta parou com o código de saída 1. Use o menu contexto para obter mais informações.[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Exception, Erros: 1[/size][/font][/color]
[color=#444444][font=verdana, sans-serif][size=0px]Fatal: [Exception] Failed: Cannot build APK![/size][/font][/color]

[Edited to fix tags.]
Title: Re: LazToAPK on windows 10
Post by: jmpessoa on November 08, 2021, 05:27:13 am
Quote
Problem in Windows 10, building APK...

Hi,  kybio!

Please, before try a "demo", do yourself a first "hello world" apk....
So you can test your system....
Title: Re: LazToAPK on windows 10
Post by: kybio on November 08, 2021, 06:29:32 am
Hi jmpessoa!

  My "Hello World" is showing this same fail, inclusive in same lines 716 and 730 in XML file. I don't know where it would be failing
Title: Re: LazToAPK on windows 10
Post by: kybio on November 09, 2021, 01:48:16 am
In the third reinstallation it worked and besides on the AVD Manager, I installed two versions and had to make a switch between them for the Android image to start appearing and working.

Thank you guys!
TinyPortal © 2005-2018