I would like to conditionally include a regular B4A library, say FusedLocationProvider, so that I can omit it in builds that do not require it but include it when needed.
Erel suggested that it would involve using
However if I do that then this statement fails to compile:
hopefully not too complicated!
It seems like what is needed is a conditional deletion of a jar/library file at compile time, so that the editor still recognises the elements of an included library but then they are removed before compilation.
Derek
Erel suggested that it would involve using
B4X:
#If FLP
#AdditionalJar: FusedLocationProvider
#End if
So I omitted FusedLocationProvider from the list of libraries, hoping that would work.However if I do that then this statement fails to compile:
B4X:
#If FLP
Dim FLP1 As FusedLocationProvider
#End If
B4A version 4.30
Parsing code. Error
Error parsing program.
Error description: Unknown type: fusedlocationprovider
Are you missing a library reference?
Occurred on line: 28
Dim FLP1 As FusedLocationProvider
So not quite so simple as I hoped. However I've heard that there might be a solution hopefully not too complicated!
It seems like what is needed is a conditional deletion of a jar/library file at compile time, so that the editor still recognises the elements of an included library but then they are removed before compilation.
Derek
Last edited: