Recent

Author Topic: Lazarus on Windows for Android  (Read 34393 times)

polypress

  • Jr. Member
  • **
  • Posts: 91
Re: Lazarus on Windows for Android
« Reply #30 on: August 29, 2013, 11:03:49 pm »
I was examining the apk file on the computer. Should I have done in on the phone (with device debugging turned on)?

Regards

polypress

  • Jr. Member
  • **
  • Posts: 91
Re: Lazarus on Windows for Android
« Reply #31 on: August 30, 2013, 11:29:58 am »
I may have found part of the problem with adb logcat.
I assumed it was analyzing the [app].apk file, but on further reading it is the phone device which produces the log, so it needs to access that device. I have the development computer isolated from all connections in order to protect it, and everything (ndk, sdk, jdk etc) is set up on this, with the [app].apk file transferred via sdcard.
I'll either have to set everything up again on the connected computer, or find another way to identify why I get the
"Unfortunately, [app] has stopped." message.

polypress

  • Jr. Member
  • **
  • Posts: 91
Re: Lazarus on Windows for Android
« Reply #32 on: August 30, 2013, 04:48:28 pm »
When running build_debug_apk.bat it says there are no class files specified, and none are written to <APK-PROJECT-PATH>\bin\classes\com\pascal\[app]\. I see they should be of the form [app]Activity.class with various inserted names (such as [app]Surface etc) which are defined in the [app]Activity.java file.
Are these written by / from the Activity.java file? If so what code is it likely to be missing?

Regards

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus on Windows for Android
« Reply #33 on: August 30, 2013, 05:08:43 pm »
Quote
I assumed it was analyzing the [app].apk file, but on further reading it is the phone device which produces the log, so it needs to access that device
Looks like you've just found out how adb logcat works ;)
Quote
When running build_debug_apk.bat it says there are no class files specified, and none are written to <APK-PROJECT-PATH>\bin\classes\com\pascal\[app]\. I see they should be of the form [app]Activity.class with various inserted names (such as [app]Surface etc) which are defined in the [app]Activity.java file.
Are these written by / from the Activity.java file? If so what code is it likely to be missing?
No idea since I don't use the .bat file (not on Linux), I use `ant` which should work on any platforms and I have those .class in the path you specify.

polypress

  • Jr. Member
  • **
  • Posts: 91
Re: Lazarus on Windows for Android
« Reply #34 on: August 30, 2013, 05:31:21 pm »
I prefer not to have to return to Linux. It was giving problems before and squandering resources.
Assuming the .class files come from the activity java file, even in Linux, do you have a basic activity.java file that I could inspect? I have tried using LCLActivity.java as a starter for the new app, but that doesn't work. I assume all references to "lcl" in that file refer to variables and functions associated with the app. I have changed each reference to one associated with the new app, including respecting any case sensitivities.
Are there any "lcl" containing variables or functions which are android keywords and whose name should be maintained?
Regards

zariq

  • Full Member
  • ***
  • Posts: 109
Re: Lazarus on Windows for Android
« Reply #35 on: August 30, 2013, 06:00:51 pm »
why don't you use delphifreaks program to set up your projects structure?

polypress

  • Jr. Member
  • **
  • Posts: 91
Re: Lazarus on Windows for Android
« Reply #36 on: August 30, 2013, 06:23:13 pm »
Do you have a link? I can't find one on Google

zariq

  • Full Member
  • ***
  • Posts: 109
Re: Lazarus on Windows for Android
« Reply #37 on: August 30, 2013, 06:50:31 pm »
Look in this forum, android section. In the What's wrong with my apk file thread, reply seven.  I had to edit the batch files to get the resulting project to compile, therefore I would suggest you download the first version, it's called apkmanager and the template project from December last year. Best thing to would be to study the code and change it for your needs. Doing so will help you better understand the project files.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus on Windows for Android
« Reply #38 on: August 31, 2013, 02:32:01 pm »
Quote
Assuming the .class files come from the activity java file, even in Linux, do you have a basic activity.java file that I could inspect? I have tried using LCLActivity.java as a starter for the new app, but that doesn't work
The only activity class required is that LCLActivity.java, you might need to only change the package name (and the respective directory hierarchy) and the .so name (look for System.loadLibrary in the static block at the end of the class). Again, an adb logcat output would be good to find where the problem is. Install the apk from adb will also reveal installation error message.
Quote
I assume all references to "lcl" in that file refer to variables and functions associated with the app. I have changed each reference to one associated with the new app, including respecting any case sensitivities.
This should not be required unless you want to support more features.
Quote
Are there any "lcl" containing variables or functions which are android keywords and whose name should be maintained?
Nope.

polypress

  • Jr. Member
  • **
  • Posts: 91
Re: Lazarus on Windows for Android
« Reply #39 on: September 01, 2013, 05:13:42 pm »
This one is a problem with TStringGrid. Although it's more to do with LCL, it is a problem specific to Android, as wince and win32 are OK.
I am using (a component based on) TStringGrid but the scrollbars do not show. I need to load 37000 rows into it and therefore need (vertical) scrollbars.
I haven't seen a post referring to this (apart from a possible reference to a bug list).
Has anyone else come across this as a problem?

Regards

 

TinyPortal © 2005-2018