Android Question How can I easily downgrade B4A?

JohnC

Expert
Licensed User
Longtime User
I am running B4A 9.01.2 and everything is working just fine.

However, some projects are kind of large and take time to compile, so I am thinking of upgrading to the latest version of B4A to take advantage of the 64-bit speed.

But I have seen posts of all sorts of problems that other users have after they do an upgrade.

The last thing I want to happen is to do the upgrade, then spend hours "fixing" issues I run into due to the upgrade - or run into new compatibility issues requiring me to rewrite code or use a different library.

So, can I simply just make a backup copy of selected directories (which ones?), and if the upgrade causes too many problems, I can simply delete the new versions of the directories and restore the original version?

Or are there other things like newer DLL versions and registry changes that would require me to completely re-install the older version (after uninstalling the newer version)?

Any help would be greatly appreciated.
 

toby

Well-Known Member
Licensed User
Longtime User
1. Backup the main drive or main disk containing B4A11.8 with a disk image backup tool like Acronis True image. Save the image file to an external disk.
2. Uninstall B4A 11.80
3. Install B4A 9.0.1
4. Backup b4A 9 disk image.

Now you can switch between B4A versions with ease by restoring the desired disk image.
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
pretty much agree with what member @toby says, althought i think he is too trusting.

i tend to have faith in erel in a number of matters (platform upgrades with backward-facing
compatibility being one of them).
i've upgraded from 9 to 11.80, with all stops in between, without issue. the issues
you mention usually seem to be a result of not following installation instructions or of
having made unfortunate decisions relating to the sdk.
that you have not run into any issues by virtue of NOT having upgraded is amazing.
and a tribute to the platform's soundness.

if you're curious about 11.80, install it on a separate device or a different vm.
hardware is cheap; ebay is always there to help.

if you can't afford a second device, at least clone your current pc's drive(s) and
make sure you can boot the system from them, should your experiment with
11.80 not go as planned and you have to "go back". make sure you try booting
more than once before putting the clone(s) in a safety deposit box at your bank.

i don't think you can "go back". for the very reasons you're asking about. at best,
you can only restore state. but i wouldn't even trust that on a single computer.
i wouldn't even let a second pc with 11.80 on it see the pc with 9.01.2. and if
one of them asked, i would laugh and deny the other existed.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
If you want to keep both B4A versions you can install the new version in another folder than the default folder.
When i upgrade to a new version i always install it in a new folder.
That way i have always at least the two last versions.
I got this habit with beta version and kept it.
But, i never had any trouble when i upgraded to a new version following the instructions given by Erel.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
If you want to keep both B4A versions you can install the new version in another folder than the default folder.
Hi @klaus,

I am revisiting this issue and I want to just upgrade to 11.5 which is the latest 32-bit version (if things go well then I will update to a 64-bit version)

I currently have these settings with my B4A 9.01.2 installation:

Javac.exe: D:\Android\Java\jdk1.8.0_172\bin\javac.exe
android.jar: D:\Android\android-sdk\platforms\android-30\android.jar
Additional Libs: D:\Android\Basic4android\AddLibs
Shared Modules: C:\VB\Android\B4A\Common

So are you saying that I can:

1) Unzip and copy the latest Openjdk 14 into a NEW directory like D:\Android\Java\jdk14.0.1)
2) Unzip and copy the CommandLineTools + Resources into a NEW directory like D:\Android\SDK
3) Install B4A 11.5 in a NEW (different) directory than where B4A 9.01 is installed,
4) Set the javac.exe and android.jar settings to the above two new directories
5) Set the "Additional Libraries" and "Shared Modules" to the same settings as B4A 9.01.

...And I will be able to run either version of B4A without any conflicting issues by having both versions installed on the same PC?

I ask because I would think there is a possibility that when I install B4A 11.5 into a different directory, it may overwrite/replace some registry entries so some things will point to the new install directory and break my 9.02 IDE from running.
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
I just tested with the default program with:
B4A version 11.5.
Java 19
Android 14
Paths: Java 19, Android 34

And also:
B4A version 11.5.
Java 11
Android 11
Paths: Java 11, Android 30

The default Hello World project works in both configurations.

When you use either one or the other B4A version you need to reconfigure the paths definition each time.
Or use the same, maybe it will work with both, I do not know.
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
hey JohnC

And I will be able to run either version of B4A without any conflicting issues by having both versions installed on the same PC?
I use both the stable version and the latest version, adjusting the paths as necessary

Без имени.png


I ask because I would think there is a possibility that when I install B4A 11.5 into a different directory, it may overwrite/replace some registry entries so some things will point to the new install directory and break my 9.02 IDE from running.
These days, I do it on the same laptop. Previously, I was using two different laptops because I had the same concern as you.

Why do I do it this way?
Often, I don't need to work with later versions of Android. In fact, some of my projects/apps are still running on Android 5 (if it work don't touch). One day, I needed to change a small text, but I tried to use the later version of B4X. What should have been a small 5min job turned into a bigger task. Of course, in the end, it worked out, especially with the support from the B4X team & forum but I prefer to do it this way :)
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Thanks guys for the confirmation! ?
 
Upvote 0

jahswant

Well-Known Member
Licensed User
Longtime User
I always try my best to push my apps to the latest version at each release ! It helps solve issues if any and minimize the impact of more increments.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
I always try my best to push my apps to the latest version at each release ! It helps solve issues if any and minimize the impact of more increments.
I'm more from the "If it's not broken, don't fix it" camp :)
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
you will have to constantly remember to manually change the various configuration paths. and to change them
back. i have 2 different versions installed. regardless of the version i run, the same configuration paths
appear when the ide is loaded. b4a keeps track of the last set of configuration values in an .ini file (b4xV5.ini on my box).
this means that the configuration paths are shared, which defeats the whole purpose of having 2 versions.
a young, healthy person such as yourself should have no problem remembering what you did last time. for me
it's another story.

i would also be wary sharing the projects, add'l libraries and shared modules folders between versions.
you might not experience issues going from 9 to 11, but upgrades to the ide may require changes to the
projects. in other words, a project may not build without the changes under 1 version of b4a, while the
same project may not build because of the changes under the other version. to give you a specific example,
under version 12.80 we had to download certain dependencies and add them with #additionaljar. under version
13 (beta), you have to remove some of the #additionaljar references or the project won't compile.
so, if the project were shared btween versions, it would only compile for 1 version (the one with the
#additionaljar or the one without it). i don't know if we have an #IF 9.02 ... #ELSIF 11.80 ... #END IF
compiler option to get around maintaining 2 copies of the same project.

when you install 2 versions, you don't get 2 icons on the desktop; only the icon for the last install is created. if you already have one, it's overwritten, so make sure to change its name before installing the second version (otherwise, you have to make your own desktop shortcuts)
 
Last edited:
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Thank you @drgottjr for mentioning the INI file - I forgot about that.....and also for the possibility that if I open a project in the newer version, it may modify a project file that could cause problems trying to later load it into an older version of B4A - I will make sure I keep a backup of each project until I know for sure I will only open it in the newer version.

Basically, I am just going through this exercise so that when I upgrade to 11.5 from 9.0 and then one of my apps doesn't compile properly, I can at least instantly go back to using the older version instead of having to immediately spend x hours trying to figure out how to get it to compile properly.

This way I will have time to figure out why it wont compile on the newer version.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
you will have to constantly remember to manually change the various configuration paths. and to change them
back. i have 2 different versions installed. regardless of the version i run, the same configuration paths
appear when the ide is loaded. b4a keeps track of the last set of configuration values in an .ini file (b4xV5.ini on my box).
I just noticed this post from another thread which seems to suggest that if you copy the INI from the "C:\Users\<user name>\AppData\Roaming\Anywhere Software" location into the actual installation directory of a B4A installation (so you can have two INI files - one in the directory of the first version of B4A and a different INI file in the directory of another version of B4A), they will each store their respective values and hopefully no more having to manually go back and forth with the settings :)

 
Upvote 0
Top