Assistance with Android Packages needed lazarus / 43-Android ---------------------------------------------------------------------- HobbyDev · 2018-04-22 09:29 Hi, Im new to Android dev. and didn't got an overview of the packages, there dependencies and so on... jet I just startet my first project and kept the default values for nkd, api-level... After creating the apk I couldn't get it installed. My mobile didn't say any reason but I presume it has to do with this packages stuff. My mobile runs on Android 6, so I should use the package 23.0.3 at least - I thought. I installed the package with the sdkmanager but if I create a new project I can not select it from the list. Can someone point me to a good wiki page which describes the whole thing with the packages, whats needed, how it works all together and so on? Thank you! ---------------------------------------------------------------------- Handoko · 2018-04-22 09:44 There could be 2 possibilities. Your apk is non-standard so it can't be installed. Or you do not follow the correct way to install it. Can you run the apk on your computer using Android emulators? It it fails to run, it means you do not configure the settings/toolchains properly. Do you know how to install apk without using Google Play? If you don't, you can get the information here: https://www.datawinners.com/install-an-android-app-without-the-google- play-store-using-apk/ You can send the apk to the forum so others can test it, but the attachable file size must be <= 250 kb. Or you can email it to me, I'll be happy to test it for you. ---------------------------------------------------------------------- jmpessoa · 2018-04-22 16:18 From: https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/Getting %20Started.txt Quote6. Connect your Device to Computer [usb] and configure it to "debug mode"       "App settings"  ---> more/aditional -- developer options:        stay awake  [checked!]       usb debugging [checked!]       verify apps via usb [checked!]    PANIC? Go to Google search with "android usb debugging " to get the operating mode adapted to your device...       ex. Galaxy S3/S4 --> app settings --> about -->> Build number -->> [tap,tap,tap,...]            ex. MI 2 --> app settings --> about -->> MIUI Version -->> [tap,tap,tap,...] 7.Lazarus IDE menu "Run" ---> "[Lamw] Build Apk and Run" [Congratulations!!!] ---------------------------------------------------------------------- HobbyDev · 2018-04-25 19:09 excuse me for the late answer... @Handoko - you wrote: QuoteYour apk is non-standard so it can't be installed. Well I'm not sure if this is the point. What I did is I used the instruction from here . After the apk was ready I opened it on my mobile but couldn't get it installed without saying any reason. And yes - all settings like Quote      stay awake  [checked!]       usb debugging [checked!]       verify apps via usb [checked!]have been made During the setup process for Lazarus I installed the build-tools for 26.0.3. Because my mobile runs on Android 6 I installed the build- tools for 23.0.3. as well. Don't know whether this was necessary or not, no idea what I should use for building an AVD with the avdmanager in order to test it inside the emulator either So for me it comes back to point that I don't understand how all these different version of sdk, ndk, build-tools, api level... work together. To test the apk file you wrote Quotethe attachable file size must be <= 250 kbMine is 264kb. I will send it to you via PM ---------------------------------------------------------------------- jmpessoa · 2018-04-25 21:11 QuoteSo for me it comes back to point that I don't understand how all these different version of sdk, ndk, build-tools, api level... work together. Do not worry [for now]...  Only accept  the default settings suggested by LAMW .... ---------------------------------------------------------------------- Handoko · 2018-04-26 02:46 Quote from: HobbyDev on April 25, 2018, 09:09:42 pmMine is 264kb. I will send it to you via PM I tested your apk on my Android 7.1.2 mobile phone. It failed to install, I think you did something wrong about the toolchains. I ever created sample-apk.zip, which you can download it for testing. You can get it here: https://forum.lazarus.freepascal.org/index.php/topic,38777.msg264419.h tml#msg264419 On the link above, you also can get the tutorial I wrote for installing and configuring LAMW. But don't use it because it is not for latest version of LAMW. ---------------------------------------------------------------------- tverweij · 2018-04-26 06:20 @Handoko: Can you make a wiki page of this sample? ---------------------------------------------------------------------- Handoko · 2018-04-26 08:38 My tutorial about LAMW is outdated and I haven't tried the new Android SDK and LAMW. ---------------------------------------------------------------------- HobbyDev · 2018-04-26 18:55 QuoteDo not worry [for now]...  Only accept  the default settings suggested by LAMW ...Well thats what I did. Coming back to my origianl question, Is it Ok! to set up the project with NDK: 27 Min API: 14 and SDK 26, even if the target Android version is 6? QuoteI think you did something wrong about the toolchains.What can I check here? ---------------------------------------------------------------------- HobbyDev · 2018-04-26 19:45 Wow - I checked the debug version of the apk and this works! I could install and run it. ---------------------------------------------------------------------- jmpessoa · 2018-04-26 20:37 Quoteto set up the project with NDK: 27 Min API: 14 and SDK 26, even if the target Android version is 6? Yes! it is Ok!!!