Android Question How do I change my library version number?

GuyBooth

Active Member
Licensed User
Longtime User
I have written a very small library. One class, with a Main module which does not become part of the library. In the Main module, I had
B4X:
#VersionCode: 1
#VersionName: 00
and I was seeing a library version 1.00 when loaded into an app.
I changed the Main module to
B4X:
#VersionCode: 1
#VersionName: 01
but I the library is still shown as version 1.00, even after moving the new files into the xtra libraries folder and reloading the app.
What am I missing?
 

udg

Expert
Licensed User
Longtime User
B4X:
#LibraryAuthor: xxxx
#LibraryName: yyyyyyyy
#LibraryVersion: 1.26
 
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
B4X:
#LibraryAuthor: xxxx
#LibraryName: yyyyyyyy
#LibraryVersion: 1.26
If I put these in the class, I get attributes not supported.
If I put them in the Main module, I get xml denied.
Where are these statements supposed to be put?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
In your Main:
B4X:
#Region  Project Attributes
   #ApplicationLabel: xxxx
   #VersionCode: 1
   #VersionName: 126
   'SupportedOrientations possible values: unspecified, landscape or portrait.
   #SupportedOrientations: unspecified
   #CanInstallToExternalStorage: False
   #LibraryAuthor: aaaaa
   #LibraryName: xxxx
   #LibraryVersion: 1.26
#End Region
I'm still using B4A 4.30 but the above worked with earlier versions too (I can't recall which was the oldest one).
 
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
Ok, I can see the reason for my problem is that as soon as I add these lines to the Main module, I have no choice on where b4A tries to write the files. Since b4a has no write access to the default location on my system, it gives me an access denied error.
Now my problem is: how can I make it bring up the dialogue box I had before, so I can write the libraries to wherever I wish and move them once they are written?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi, I guess what you're looking for is:
Tools/Configure Paths and then Additional Libraries.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Hi, I guess what you're looking for is:
Tools/Configure Paths and then Additional Libraries.
You should be aware that compiled classes/customViews are saved into the additional libraries folder as defined in the paths tools.
 
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
The additional libraries folder is Read-Only. Even with administrator rights I have been unable to change this. B4A cannot write to it.
I can change the path setting, create and save the jar and xml files to the new path, then copy them over using Windows (when I do it this way, Windows 10 asks me to confirm as administrator, then allows me to complete the copy). Then I reset the path.
This only works because I am not using any of the extra libraries, whose path I had to reset, to create my new ones.
I really need to be asked where to save the compiled files ... as I am if I don't set the library attributes.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
You can point your aditional folder anywhere in your system... Mine for instance points to a folder in my secondary drive. Folders under windows/system ARE read only and are not a good place for this
 
Upvote 0

udg

Expert
Licensed User
Longtime User
As Cableguy explained, the Additional Libraries folder can be placed everywhere. Just keep it distinct from the one used by Internal Libraries (the ones part of B4x).
When you compile your own libraries, those will go in the Additional Libraries folder and you'll see them in the IDE's Libraries tab.
When eventually you'll download any third-party lib, place it in that same Additional libraries folder.

So, make a writeable folder wherever you feel it's right for you then set its path in Tools/Configure Paths - Additional Libraries.
 
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
Thanks for everyone's input. I had always kept my libraries in a folder "right next to" the B4A libraries folder. Never was a problem until I wanted to compile my own libraries, so now I've created a folder somewhere else.
 
Upvote 0
Top