Recent

Author Topic: LAMW App Crashes on Start up  (Read 16124 times)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW App Crashes on Start up
« Reply #30 on: September 22, 2017, 01:16:19 am »

And for others "demos" ??
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #31 on: September 22, 2017, 01:25:22 am »
After changing custom options to -CfVFPV3 -CpARMV7A  AppDemo1 compiles and runs on the device as expected.  ;)

With new LAMW apps  there is something wrong with the positioning of  the controls. They are all at the top of a the form, partially covering each other.  Could be me missing some basic stuff. If this is not related to the compilation issues probably best discussed in a different topic.

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #32 on: September 22, 2017, 01:29:17 am »
2D graphics is crashing DemoApp1 though. But it was the same when it was compiled with Laz4Android, so again it is  a different topic.  ;D

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW App Crashes on Start up
« Reply #33 on: September 22, 2017, 01:42:34 am »
Quote
Panic: C:\A\Projects\DEMO\AppmORMotDemo1\build.xml:12: Cannot find C:\tools\ant\build.xml imported from C:\A\Projects\DEMO\AppmORMotDemo1\build.xml

Maybe a path issue? It seems as if "C:\tools\" was somehow hard-coded. (It is installed to a different directory.)

Your  problem is here:
Quote
Cannot find C:\tools\ant\build.xml
                             

This part "C:\tools\" should be replaced [by LAMW] to your "android-sdk" local path
« Last Edit: September 22, 2017, 01:44:50 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #34 on: September 22, 2017, 01:49:52 am »
 My JNIAndroidProject.ini, all paths are valid. Is there any other place I could change the path?

[NewProject]
PathToAndroidSDK=C:\Android\sdk
PathToAndroidNDK=C:\Android\ndk
PathToNdkPlataforms=C:\Android\ndk
PathToJavaTemplates=C:\fpcupdeluxe\ccr\lamw\java
PathToJavaJDK=C:\Program Files (x86)\Java\jdk1.8.0_144
PathToAntBin=c:\Apps\apache-ant\bin
NDK=3
PrebuildOSYS=windows
PathToWorkspace=C:\A\Test
FullProjectName=C:\A\Test\LamwGUIProject2
InstructionSet=2
ProjectModel=1
AntPackageName=org.lamw
AndroidPlatform=0
MinApi=2
TargetApi=1
AntBuildMode=debug
MainActivity=App
SupportV4=
« Last Edit: September 22, 2017, 01:51:55 am by CC »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW App Crashes on Start up
« Reply #35 on: September 22, 2017, 02:00:15 am »
You can:

1.Test if you have "C:\Android\sdk\tools\ant\build.xml"

2. Check "AppmORMotDemo1\build.xml" for missing sdk path ...
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #36 on: September 22, 2017, 02:29:14 am »
jmpessoa

 "AppmORMotDemo1\build.xml"  existed, but it its content was not right.  After replacing it with the original file from DonAlfredo LAMW works with  mORMot again.

You were very helpful, thank you!
« Last Edit: September 22, 2017, 02:31:17 am by CC »

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #37 on: September 22, 2017, 11:19:20 am »
Summary:

If anyone wants to use fpcupdeluxe with LAMW  check out the trunk versions. Project custom options needs to have these: -CfVFPV3 -CpARMV7A

I have successfully compiled and executed LAMW demos with SDK API 21,25,26 with Min API 14.

The mORMot demo needs to be updated in the LAMW repo

@DonAlfredo: if you made  changes to mORMot source please let us know when it is commited to the mORMot repo.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: LAMW App Crashes on Start up
« Reply #38 on: September 22, 2017, 12:21:39 pm »
No changes were made regarding the mORMot source !
mORMot works out-of-the-box with FPC trunk.

Also.
No custom options are needed.
If all goes well, all settings are already correct and used by FPC in fpc.cfg.
E.g. -CfVFPV3 -CpARMV7A is set by fpc.cfg

I will update the mORMot sample by doing a pull-request for LAMW.

Please note that the setup as created by fpcupdeluxe can also be used to build Android-apps based on the very nice Castle Game Engine !!
https://castle-engine.sourceforge.io/
The same is valid for the also very nice Platform eXtended Library !
http://asphyre.net/platformextendedlibrary

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #39 on: September 22, 2017, 01:04:31 pm »
DonAlfredo

Thanks for the clarification. Your suggestions may come handy. :)

The way LAMW IDE tools is currently  implemented it will add some customn options ( -Cf -Cp included) when creating a new app. This is something to be mindful of. 

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: LAMW App Crashes on Start up
« Reply #40 on: September 22, 2017, 01:29:39 pm »
@CC
You are very right !
Perhaps a WiKi entry should be added for users of LAMW that have used fpcupdeluxe to install trunk/cross-compilers, and want to create Android apps with FPC trunk (and mORMot).

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: LAMW App Crashes on Start up
« Reply #41 on: September 23, 2017, 10:37:20 am »
The mORMot demo has been updated in the LAMW repo.

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #42 on: September 23, 2017, 11:08:43 pm »
Thank you!

 

TinyPortal © 2005-2018