Demo apps crash on startup lazarus / 43-Android ---------------------------------------------------------------------- tango13 · 2021-05-27 15:19 Hi all, I finally managed to compile and run some of the demo apps that come with LAMW but they all crash on startup. The error I get with logcat is Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 05-27 17:02:19.829 20017 20017 E JNI_Loading_libcontrols: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.lam w.appmenudemo2- w3AxaKV6y57YUTD00uMpzg==/base.apk"],nativeLibraryDirectories=[/data/ap p/org.lamw.appmenudemo2-w3AxaKV6y57YUTD00uMpzg==/lib/arm64, /system/lib64]]] couldn't find "libcontrols.so" I am compiling the project by manually launching the gradle-local- run.sh script, but I'm clearly missing something since it cannot find the libcontrols library. Thank you! ---------------------------------------------------------------------- jmpessoa · 2021-05-27 16:37 hi, tango13! Some hints 1) Go to lazarus menu  "Tools" --> "[LAMW]....." --->  "Paths Settings" and confirm that everything is correct ... 2) Create a new  LAMW project :  "Project"  --- "New Project" ---> "[LAMW] GUI ....."   3) Build the LAMW  "libcontrols.so"  library:  "Run"  --> "Clean up and Build" 4) Connect some android device to your PC (or start some android emulador/AVD) 5) "Run"  --> "[LAMW] Build Android Apk and Run" If you were successful then Congratulations!!! Now you can try open some LAMW demo: 1) Open a LAMW demo project   2) Build the LAMW  "libcontrols.so"  library:  "Run"  --> "Clean up and Build" 3) Connect some android device to your PC (or start some android emulador/AVD) 4) "Run"  --> "[LAMW] Build Android Apk and Run" ---------------------------------------------------------------------- tango13 · 2021-05-28 06:23 Hi Jose and thanks for your reply. I did as you said, everything works up to point 2 of the demo project, libcontrols is built but the project is not, the error is Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Fatal: Cannot find system used by controls. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=D:\lamw_manager\LAMW\LAMW4Windows\fpc\3.2.0\units\arm- android\rtl\system.ppu.. What is even worse is that now I can't compile anymore my projects, the error is the same Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Fatal: Cannot find system used by fcllaz. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=D:\lamw_manager\LAMW\LAMW4Windows\fpc\3.2.0\units\arm- android\rtl\system.ppu.. but I didn't change anything in my project's paths. I'm a little lost...  Thank you. ---------------------------------------------------------------------- rsu333 · 2021-05-28 07:20 Have you updated from lamw manager ?better use laz4android ,It run smoothly ---------------------------------------------------------------------- tango13 · 2021-05-28 08:45 Yes, I reinstalled everything from scratch using lamw manager and now it's back to work. Unfortunately I mostly use Lazarus under Linux and as far as I understand Laz4android is windows-only Thank you. ---------------------------------------------------------------------- tango13 · 2021-05-28 10:30 Also, I'm trying to use the code in AppMenuDemo to create an option menu but I don't seem to get anywhere, no menus show up. Can anyone please shed some light on how to do it? Thank you very much! ---------------------------------------------------------------------- tango13 · 2021-05-28 11:09 Making some progress, but if I try this code Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.DataModuleCreateOptionMenu(Sender: TObject; jObjMenu: jObject);var   i: integer;   //jSubMenu: jObject;begin   for i:=0 to jMenu1.Options.Count-1 do   begin        //0:mitDefault; 1:misIfRoom      jMenu1.AddItem(jObjMenu, 10+i {itemID}, jMenu1.Options.Strings[i], mitDefault);   endend; I get this error Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i JNI DETECTED ERROR IN APPLICATION: bad arguments passed to void org.lamw.magicspiral.jMenu.AddItem(android.view.SubMenu, int, java.lang.String, int) I am most likely doing something wrong, but what? Thank you ---------------------------------------------------------------------- tango13 · 2021-05-28 11:26 Solved, never mind...