Recent

Author Topic: Bug [LAMW] "Target SDK Version" not Save!  (Read 3422 times)

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Bug [LAMW] "Target SDK Version" not Save!
« on: July 13, 2018, 12:27:15 pm »
@jmpessoa

When I modify "Target SDK Version" a project "Gradle" or "Ant" and close that project and when I open it does not save the "Target SDK Version"

When I want to compile a "Gradle" project with a different version at 28 I have to manually change the "build.gradle" file with the following modification:

Code: Java  [Select][+][-]
  1. defaultConfig {
  2.             minSdkVersion 14
  3.             targetSdkVersion 28 //22 for example I have to change manual
  4.             versionCode 1
  5.             versionName "1.0"
  6.     }

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Bug [LAMW] "Target SDK Version" not Save!
« Reply #1 on: July 16, 2018, 05:02:32 am »
Hello TR3E!


LAMW will [always] look for the more "up-to-date"   sdk pair  "platforms/build-tools"
to compile [and target] ....  and you'll still be able to run your applications on old [>4.0] devices...
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Re: Bug [LAMW] "Target SDK Version" not Save!
« Reply #2 on: July 16, 2018, 10:52:25 am »
The problem is that from version 6 of android "SDK 24", the permissions must be granted in time of execution. If we compile for "SDK 28" with runtime permissions on Android 4 and Android 5 it will give a fatal error when trying to execute, the permissions at runtime. That is why I prefer to compile with SDK 22 for more compatibility.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Bug [LAMW] "Target SDK Version" not Save!
« Reply #3 on: July 16, 2018, 11:35:12 pm »

Ok, i will improve  LAMW!

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

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Bug [LAMW] "Target SDK Version" not Save!
« Reply #4 on: July 18, 2018, 09:21:33 pm »
Improved New Project dialog [flexible target api (+)]
 
and you can now add/configure "JNIAndroidProject.ini"
  KeepManifestTargetApi=t

to preserve the sdk target based in the "AndroidManifest.xml"

Thank you!
« Last Edit: July 18, 2018, 09:31:06 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Re: Bug [LAMW] "Target SDK Version" not Save!
« Reply #5 on: July 20, 2018, 02:28:37 pm »
Great job, thank you very much.

 

TinyPortal © 2005-2018