Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

Generate Android Arm APK from Windows 10 years 2 months ago #5128

  • Raul
  • Raul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Hello
I managed to configure CodeTyhon windows and compile Android Arm correctly. The result is a file with no extension and a "lib" folder with files with extension .o, .or, .Compiled, .res but can not get any file with extension .so and is not the way to get generate an an APK that works on Android. Someone can help me.
I have read all the tutorials and tried several scripts but not having a file extension .so i can not accomplish anything.
Thank you.

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5129

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

rysrys wrote: Hello
I managed to configure CodeTyhon windows and compile Android Arm correctly. The result is a file with no extension and a "lib" folder with files with extension .o, .or, .Compiled, .res but can not get any file with extension .so and is not the way to get generate an an APK that works on Android. Someone can help me.
I have read all the tutorials and tried several scripts but not having a file extension .so i can not accomplish anything.
Thank you.


There is my message just before yours in which I wrote:

Be sure that you set Target file name to android\libs\armeabi\liblclapp.so, that you added correct path to Android NDK in Labraries and that you set Target OS to Android and Target CPU to ARM.

Build project and check if you have liblclapp.so in c:\codetyphon\CodeOcean\2_Basics\samples\androidlcl\android\libs\armeabi


If you had read what I wrote you would probably also noticed info that even compilation is sucessfull produced library gonna crash. I also wrote how to temporary solve that problem. You would also noticed reference to my other post about apk building.

Please Log in or Create an account to join the conversation.

Last edit: by Aleksandar.

Generate Android Arm APK from Windows 10 years 2 months ago #5135

  • Raul
  • Raul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Tank you very much,
I needed to write "c:\codetyphon\CodeOcean\2_Basics\samples\androidlcl\android\libs\armeab\liblclapp.so" in target file in codeTyphon and I had thought that was for a specific example for each application and had to put the directory of the application itself.
Indeed, now I could generate the APK but as you say does not work on android devices tested. If you find a solution for this I thank you share it with who and I are beginners in programming for these devices.
I reiterate my thanks for opening my eyes because I had read your post but could not get anything.
Greetings.

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5142

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

rysrys wrote: Tank you very much,
Indeed, now I could generate the APK but as you say does not work on android devices tested. If you find a solution for this I thank you share it with who and I are beginners in programming for these devices.
I reiterate my thanks for opening my eyes because I had read your post but could not get anything.
Greetings.


In message you replayed I wrote:

viking wrote: I also wrote how to temporary solve that problem.


Even if you haven't notice that, remember that search is your friend.

viking wrote: Looks like some change in latest versions of FPC is cause of all those crashes.

I managed to make working android application using some files from older FPC.

I put archive with used files on dropbox. Use them only as temporary solution until someone find how to solve this properly.

Please Log in or Create an account to join the conversation.

Last edit: by Aleksandar.

Generate Android Arm APK from Windows 10 years 2 months ago #5149

  • Raul
  • Raul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Hello Viking and thank you very much for your help.
I did what you recommend in your post but I get an error loading the Typhon 32 (BigIde) and if I ignore it starts but then gives me compilation errors. I detail what I have done and errors:
1.- Replace ppcrossarm.exe in c:\codetyphon\fpc\bin\i386-win32 with the one from your archives of DropBox
2.- Remove c:\codetyphon\fpc\units and replace it with the one from your archives of DropBox
3.- Delete folder c:\codetyphon\typhon\lcl\units\arm-android
Then I proceed to start the "Typhon32 for Win32 (BigIde)" and I get the error:
"Error: system.ppu no se encuentra. Revise su fpc.cfg" in Tab Compilador
If I ignore this error and start IDE, when compiling get the error:
gtk2\gtk2int.pas(36,6) Fatal: Can't find unit XLib used by Gtk2Int
Am I doing something wrong?
My version of Codetyphon is 4.7 and Java 1.7.0_51

I still have not managed to never start an application on Android but with your help I advance. thank you very much and sorry for my English.

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5152

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

rysrys wrote: Hello Viking and thank you very much for your help.
I did what you recommend in your post but I get an error loading the Typhon 32 (BigIde) and if I ignore it starts but then gives me compilation errors. I detail what I have done and errors:
1.- Replace ppcrossarm.exe in c:\codetyphon\fpc\bin\i386-win32 with the one from your archives of DropBox
2.- Remove c:\codetyphon\fpc\units and replace it with the one from your archives of DropBox
3.- Delete folder c:\codetyphon\typhon\lcl\units\arm-android
Then I proceed to start the "Typhon32 for Win32 (BigIde)" and I get the error:
"Error: system.ppu no se encuentra. Revise su fpc.cfg" in Tab Compilador
If I ignore this error and start IDE, when compiling get the error:
gtk2\gtk2int.pas(36,6) Fatal: Can't find unit XLib used by Gtk2Int
Am I doing something wrong?
My version of Codetyphon is 4.7 and Java 1.7.0_51

I still have not managed to never start an application on Android but with your help I advance. thank you very much and sorry for my English.


Looks like I made a mess with copy paste while I was writing that post. :blush:

I hope that you followed the first step and made a backup of your c:\codetyphon\fpc\units folder. You cannot remove whole c:\codetyphon\fpc\units, since you will lost some important files. beacuse I packaged only subfolder that is related to Android.

Please restore your c:\codetyphon\fpc\units first. Then remove c:\codetyphon\fpc\units\arm-android and replace it with the one inside archive.

This works, but it is not proper solution. It is just workaround until someone figure out where problem is.

For now we only know that some change in ARM compiler between 2013-5-12 and 14-1-2014 causing the problem with crash.

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5154

  • sax
  • sax's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
I have already done since I first looked at the contents of your archive, but I forgot to tell you.
Today I test application (with Accelerometer) and it works perfectly on Alcatel OT-991 Android OS, v2.3.6 (Gingerbread)

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5155

  • sam
  • sam's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 20
  • Thank you received: 2
I have opened a bug report in the bugtracker.
Bug #25686

Please Log in or Create an account to join the conversation.

Last edit: by sam.

Generate Android Arm APK from Windows 10 years 2 months ago #5162

  • Raul
  • Raul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Hello again,
I finally managed to compile the application files by changing the compiler of the previous version but still can not run the application in the emulator.
Compile, Built_debug_APK Properly and ADB_Install well but when running the application in the emulator gets the message:
The application LCL Test
(process com.pascal.lcltest)
has stopped unexpectedly.
Please try again.

The application consists of a window with an Edit and a button and have tried emulating different versions of android but none works.
What am I doing wrong?
Thank you very much for the help.

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5163

  • sax
  • sax's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
Unzip .apk and check if you have .so file in .\lib\armeabi\ directory.

Please Log in or Create an account to join the conversation.

Last edit: by sax.

Generate Android Arm APK from Windows 10 years 2 months ago #5164

  • Raul
  • Raul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
First thanks for your answer,
I have checked the APK and everything seems to be in place.

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5168

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

rysrys wrote: Hello again,
I finally managed to compile the application files by changing the compiler of the previous version but still can not run the application in the emulator.
Compile, Built_debug_APK Properly and ADB_Install well but when running the application in the emulator gets the message:
The application LCL Test
(process com.pascal.lcltest)
has stopped unexpectedly.
Please try again.

The application consists of a window with an Edit and a button and have tried emulating different versions of android but none works.
What am I doing wrong?
Thank you very much for the help.


Some time ago I found info that Android emulator with API level less then 9 emulates ARMv5, and since you compile for ARMv6 you will always get a crash in API level 8 emulator.

Just use emulator with some later API version.

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5170

  • Raul
  • Raul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Viking thanks for the response,
I tried all versions, the error in API8 is:
The application LCL Test
(process com.pascal.lcltest)
has stopped unexpectedly.
Please try again.

An the error in API14 and API19 is:
Unfortunately, LCL Test has Stopped.

You think of anything?

Thank You.

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5174

  • Raul
  • Raul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Hello,
I can not move so I put a link to my SO APK file and if someone can try and see where the error may be.

www.dropbox.com/s/btq6q5gpm2fydei/File%20SO%20and%20APK.rar

Thanks for your help.

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5175

  • sam
  • sam's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 20
  • Thank you received: 2
You could try my latest package.
But first install JDK 1.7.

Then install this:

setup_laztoapk_alpha_005_experimental.exe

Please Log in or Create an account to join the conversation.

Generate Android Arm APK from Windows 10 years 2 months ago #5184

  • Raul
  • Raul's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Hello,
I tried LaztoAPK but not how to use it. I have correctly configured all PATH by I did not catch that folder in the first option. I select the folder where I saved my application made ​​with CodeTyphon but always generates a APK that has nothing to do with my application and if it works in the emulator.
Can you help please.
Thank you.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1