[SOLVED] Error Building APK with LAMW/Windows lazarus / 43-Android ---------------------------------------------------------------------- tintinux · 2016-04-22 17:43 Hi Currently, I'm trying on Windows and installed successfully from HOW_TO_INSTALL_by_Dieselnutjob.pdf I use the fpc and lazarus versions specified, not stable versions here. Build looks OK : 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 Compile package FCL 1.0.1: SuccessCompile package LazUtils 1.0: SuccessCompile package LCLBase 1.5: SuccessCompile package tfpandroidbridge_pack 0.0: SuccessCompile Project, OS: android, CPU: arm, Target: C:\lamw\projects\LamwGUIProject1\libs\armeabi-v7a\libcontrols.so: Success, Hints: 5unit1.pas(9,22) Hint: Unit "And_jni" not used in unit1unit1.pas(9,31) Hint: Unit "And_jni_Bridge" not used in unit1unit1.pas(10,5) Hint: Unit "Laz_And_Controls_Events" not used in unit1controls.lpr(1248,34) Hint: Parameter "reserved" not usedcontrols.lpr(1264,37) Hint: Parameter "reserved" not used Except the small difference armeabi changed to armeabi-v7a. But Build APK doesn't work : 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 Messages, Hints: 2Note: Duplicate unit "controls" in "controls", orphaned ppu "C:\lamw\projects\LamwGUIProject1\obj\controls\controls.o"Note: Duplicate unit "controls" in "LCLBase 1.5", ppu="C:\lamw\laz4android\lcl\units\arm-android\controls.ppu", source="C:\lamw\laz4android\lcl\controls.pp"Building APK... : missing executable "", Errors: 1Panic: internal error: missing executable ""Exception, Errors: 1Fatal: [Exception] Failed: Cannot build APK! Of course I have checked again all the parameters and paths... What am I missing ? What else can I check ? Thanks ---------------------------------------------------------------------- jmpessoa · 2016-04-22 18:05 Hello tintnux! Please, go to your "C:\lazarus\config"  and send me your file: "JNIAndroidProject.ini" Thank you! ---------------------------------------------------------------------- tintinux · 2016-04-23 05:55 Hi This is my c:\lamw\laz4Android\JNIAndroidProject.ini file    (I suppose it is the path you want, there is none in c:\lazarus) Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i [NewProject]PathToNdkPlataforms=C:\lamw\android- ndk-r10ePathToJavaTemplates=C:\lamw\trunk\javaPathToJavaJDK=C:\Program Files (x86)\Java\jdk1.8.0_65PathToAndroidNDK=C:\lamw\android- ndk-r10ePathToAndroidSDK=C:\lamw\android-sdk- windowsPathToAntBin=C:\lamw\apache-ant-1.9.6- binNDK=3PrebuildOSYS=windowsPathToWorkspace=C:\lamw\projectsFullProjec tName=C:\lamw\projects\LamwGUIProject1InstructionSet=1FPUSet=0ProjectM odel=1AntPackageName=org.lamwAndroidPlatform=3MinApi=4TargetApi=0AntBu ildMode=debugMainActivity=AppSupportV4=no Thanks for your help ---------------------------------------------------------------------- jmpessoa · 2016-04-23 16:25 Ok. Please, try change: PathToAntBin=C:\lamw\apache-ant-1.9.6-bin to PathToAntBin=C:\lamw\apache-ant-1.9.7-bin\apache-ant-1.9.7\bin [we need de folder "...\bin" to run ant command line tool] Thank you! ---------------------------------------------------------------------- tintinux · 2016-04-23 17:49 Hi According the documentation, I have installed only apache- ant-1.9.6-bin, not 1.9.7 With : 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 PathToAntBin=C:\lamw\apache-ant-1.9.6-bin\apache-ant-1.9.6\bin It is better, but I have now the following 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 Messages, Hints: 2Note: Duplicate unit "controls" in "controls", orphaned ppu "C:\lamw\projects\LamwGUIProject1\obj\controls\controls.o"Note: Duplicate unit "controls" in "LCLBase 1.5", ppu="C:\lamw\laz4android\lcl\units\arm-android\controls.ppu", source="C:\lamw\laz4android\lcl\controls.pp"Building APK... : Exit code 1, Errors: 1Buildfile: C:\lamw\projects\LamwGUIProject1\build.xml BUILD FAILEDC:\lamw\projects\LamwGUIProject1\build.xml:7: Cannot find C:\lamw\android-sdk-windows\tools\ant\build.xml imported from C:\lamw\projects\LamwGUIProject1\build.xml Total time: 0 secondsPanic: tool stopped with exit code 1. Use context menu to get more information.Exception, Errors: 1Fatal: [Exception] Failed: Cannot build APK! There is no directory C:\lamw\android-sdk-windows\tools And Build.xml file are existing only in the projects, demos and example folders. Thanks again for your help ! ---------------------------------------------------------------------- jmpessoa · 2016-04-23 18:06 Yes, ant apache 1.9.6 is ok! About: QuoteBUILD FAILED C:\lamw\projects\LamwGUIProject1\build.xml:7: Cannot find C:\lamw\android-sdk-windows\tools\ant\build.xml imported from C:\lamw\projects\LamwGUIProject1\build.xml Your system fail here: QuoteCannot find C:\lamw\android-sdk-windows\tools\ant\build.xml if you do not have this default sdk folders tree : "C:\lamw\android- sdk-windows\tools\ant\" what sdk you have installed? Suggestion: delete your sdk folder content and re-install  your sdk! ---------------------------------------------------------------------- A.S. · 2016-04-23 19:01 tintinux, you should check if there is "ant.bat" in your PathToAntBin directory. If it is not, then you should change it (Tools -> [Lamw] Android Module Wizard -> Paths Settings: Path to ant bin). ---------------------------------------------------------------------- tintinux · 2016-04-24 13:09 Many thanks, now it is working. The problem was that I had several SDK installed and was not updating the one used by lamw. There are several wrong things in the PDF tutorial, and some informations and explanations to add. The Wiki page has some useful informations, but is missing details. Don't you think it is better to maintain only the Wiki page, and delete the PDF to avoid confusion. Best regards ---------------------------------------------------------------------- jmpessoa · 2016-04-24 15:06 OK. Can you add some important and useful information to wiki? Thank you! ---------------------------------------------------------------------- tintinux · 2016-04-25 07:34 Hi I have created a new page for installation of LAMW to allow others to check and update it. It is directly coming from the PDF by Dieselnutjob, with a few corrections and remarks from my recent experience. I can't finish today, but will add images as soon as possible. Everyone of course is welcome to check and improve it ! I suggest to remove the PDF from the distribution, or to change it to contain only a link to this new wiki page, since it will not be updated. I didn't change the old page although it is today useless, and for now there is no link to the new page. After some validation of the new page, I think the old page could be an entry point to the new one and contain only general informations about Lazarus/Android or  links to other tools or pages related. Regards, Tintinux