Recent

Author Topic: [solved]Unable to build apk under windows  (Read 22437 times)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Unable to build apk under windows
« Reply #15 on: April 29, 2012, 11:35:41 pm »
Maybe creating a batch file where we could make all the changes ?

Yes, but I will change something. Having the package name in the LCL is very nasty... the LCL should be usable in any project without changes. I will make a routine in the .java file which returns the package name. Hopefully it will work, because JNI_OnLoad is very early.

Quote
In whixh section do you want me to post in the wiki ?

Here: http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Step_3_-_Create_the_Android_project_structure

huberte

  • Jr. Member
  • **
  • Posts: 78
Re: [solved]Unable to build apk under windows
« Reply #16 on: April 29, 2012, 11:54:28 pm »
Ok, strange that no one else did see that... I think I'm the first to build an apk with Lazarus  8-)  ;)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: [solved]Unable to build apk under windows
« Reply #17 on: April 30, 2012, 06:48:55 am »
Quote
Ok, strange that no one else did see that... I think I'm the first to build an apk with Lazarus
Of course not, a couple of people must have done it, but they just never encounter such a problem or don't take the lazarus way of building andrid apps (I, for example, prefer FPC_JVM instead).

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Unable to build apk under windows
« Reply #18 on: April 30, 2012, 10:38:37 am »
Yes, but I will change something. Having the package name in the LCL is very nasty... the LCL should be usable in any project without changes. I will make a routine in the .java file which returns the package name. Hopefully it will work, because JNI_OnLoad is very early.

Ok, I commited my change here: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=37099

Note that you will need to not only update your lcl but also do the small change in the .java file.

You should now write the package name in your main project file, like this:

library androidlcltest;
............
begin
  CDWidgetset.ActivityClassName := 'com/pascal/lcltest/LCLActivity';
  CDWidgetset.ActivityOnCreate := @MyActivityOnCreate;
end.

Please test if now you can use your project without altering the LCL

truetom

  • Jr. Member
  • **
  • Posts: 73
    • http://sourceforge.net/projects/laz4android/
Re: [solved]Unable to build apk under windows
« Reply #19 on: April 30, 2012, 04:16:54 pm »
In fact , in China ,i  have success build the androidlcltest APK at 28 February with Lazarus and it's work ok at my Lenovo Lepad A107. i also have finished write a Chinese guide to the Chinese Lazarus user.a lot of people have success build his androidlcltest APK at China.

To Felipe:
I have test the SVN 37100 androidlcltest , it's work fine at my Lenovo Lepad A107 .thank you great job!

sorry for my bad english!
laz4android : a Lazarus for Android Package.
http://sourceforge.net/projects/laz4android/

huberte

  • Jr. Member
  • **
  • Posts: 78
Re: Unable to build apk under windows
« Reply #20 on: May 01, 2012, 06:15:29 am »
Please test if now you can use your project without altering the LCL

Great ! It Works !

 

TinyPortal © 2005-2018