Recent

Author Topic: Assistance with Android Packages needed  (Read 4129 times)

HobbyDev

  • New Member
  • *
  • Posts: 25
Assistance with Android Packages needed
« on: April 22, 2018, 11:29:35 am »
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

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: Assistance with Android Packages needed
« Reply #1 on: April 22, 2018, 11:44:41 am »
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

  • Hero Member
  • *****
  • Posts: 2297
Re: Assistance with Android Packages needed
« Reply #2 on: April 22, 2018, 06:18:00 pm »
From:

https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/Getting%20Started.txt

Quote
6. 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 <device name>" 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!!!]
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

HobbyDev

  • New Member
  • *
  • Posts: 25
Re: Assistance with Android Packages needed
« Reply #3 on: April 25, 2018, 09:09:42 pm »
excuse me for the late answer...

@Handoko - you wrote:
Quote
Your 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
Quote
the attachable file size must be <= 250 kb
Mine is 264kb. I will send it to you via PM
« Last Edit: April 25, 2018, 09:46:59 pm by HobbyDev »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Assistance with Android Packages needed
« Reply #4 on: April 25, 2018, 11:11:14 pm »
Quote
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.

Do not worry [for now]...  Only accept  the default settings suggested by LAMW ....




Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: Assistance with Android Packages needed
« Reply #5 on: April 26, 2018, 04:46:58 am »
Mine 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.html#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

  • Guest
Re: Assistance with Android Packages needed
« Reply #6 on: April 26, 2018, 08:20:38 am »
@Handoko: Can you make a wiki page of this sample?

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: Assistance with Android Packages needed
« Reply #7 on: April 26, 2018, 10:38:18 am »
My tutorial about LAMW is outdated and I haven't tried the new Android SDK and LAMW.

HobbyDev

  • New Member
  • *
  • Posts: 25
Re: Assistance with Android Packages needed
« Reply #8 on: April 26, 2018, 08:55:19 pm »
Quote
Do 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?

Quote
I think you did something wrong about the toolchains.
What can I check here?

« Last Edit: April 26, 2018, 09:07:52 pm by HobbyDev »

HobbyDev

  • New Member
  • *
  • Posts: 25
Re: Assistance with Android Packages needed
« Reply #9 on: April 26, 2018, 09:45:29 pm »
Wow - I checked the debug version of the apk and this works! I could install and run it.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Assistance with Android Packages needed
« Reply #10 on: April 26, 2018, 10:37:29 pm »
Quote
to 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!!!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018