Android Question [SOLVED] I constantly have to manually delete the Objects folder in B4A & B4J

Peter Simpson

Expert
Licensed User
Longtime User
The title says it all,
For months now, and I do mean months, in both Windows 10 and Windows 11, I've been receiving these messages. When I do receive these messages in both B4A and B4j (in all the current and previously created projects, and I do mean all previously created projects going back years), I have to go into the projects folder and manually delete the Objects folder (the Objects folder deletes with no issues whatsoever), I then clean the project (Ctrl + P) and I can then run the program in release mode (only once) (F5) to build the release applications, .apk file in B4A and .jar file for B4J. Please note that I can only do this once, on the second attempt to run the project in release mode (F5), I will receive the access denied messages and I then have to delete the Objects folder again. Please note that I do not have this issue in debug mode, only in release Mode. I have also tried running B4A as an Administrator (by right clicking on the shortcut icons) and I still have the same issue.

Yes I have deleted everything, and reinstalled it all again from scratch including B4A and B4J, OpenJDK x + OpenJFX, and Android SDK + Required Resources for B4A.

When I receive these messages, I have to go to the project folder and delete the Objects folder. Actually I only need to delete the files mentioned, but it is far quicker to just delete the whole Objects folder. This only happens in release mode and NOT in debug mode.

I've searched the forum but it appears that I'm the only person with this issue, which after months of putting up with this, it has finally got on my nerves today as I had to quickly update an app for a client when this happened again, thus annoying me as I should not be coding for a few days.

When it comes to my laptops, absolutely nothing has changed as far as I'm concerned. The B4X project folders have been in my Documents > B4X > ... for absolutely years now, actually since Tue, 3 Apr 2012 to be exact. So no, it has absolutely nothing to do with the folder structure before someone mentions that.

I presume that it's going to be something extremely simple that I'm missing here. I have also turned off my antivirus, it still does it for me on the second Run (F5) attempt.

B4A - When I click Run (F5)
1752244508663.png


B4A - When I click on clean project (Ctrl + P)
1752244893551.png


B4J - When I click Run (F5)
1752244600534.png


B4J - When I click on clean project (Ctrl + P)
1752244989672.png



I've tried to be as thorough as possible with laying out the issue that I'm having.

Thanks in advance for the responses.
 

Attachments

  • 1752245019761.png
    1752245019761.png
    39.3 KB · Views: 44

Peter Simpson

Expert
Licensed User
Longtime User
Hello @marcick,
I read everything, but I’m not sure if the issue is actually resolved.
Yes, my issue is 100% fixed, guaranteed :)

You should disable OneDrive then try it, I know from multiple customers experience that OneDrive can and does sometimes lock files and causes all sorts of issues, not always though. I had a customer who had OneDrive and some CAD software issues, disabling OneDrive fixed their issues within seconds. But as I mentioned previously, not always.

Just try that first, but my issue is definitely fixed.

BTW, I personally don't use OneDrive, I have other solution that I prefer for my source code backup solutions, and no not Google or Dropbox either.

I hope that you're having a nice hot day in Milano :cool:
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Do you mean a folder copied from onedrive to the desktop (that is not under onedrive) may remain locked? Strange. All my job is under ondrive since years and I don't think I'll move to other solutions, I have 1TB space with the office365 subscription. And yes, hot but not so terrible as previous weeks. 😉
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Hey, I started watching Season 2 of a show with your username in its title a couple of nights ago. I'm enjoying it 😉
I liked S1 more, but hey... eternals never die, right?
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Do you mean a folder copied from onedrive to the desktop (that is not under onedrive) may remain locked?
You could always try disabling OneDrive for a few minutes, then try running your B4X projects from that location, just to test it out.

Or better still, find out what program is locking the files by using one of the two solutions previously mentioned on this thread.

And yes, hot but not so terrible as previous weeks. 😉
I think that I remember reading that your country had wildfires not long ago.
 
Upvote 0

juannybennett

New Member
Licensed User
Longtime User
For what it's worth . . .
I use numerous software and firmware development systems for various platforms along with a number of mechanical and PCB CAD, several hardware test and measurement programs, video editiing, word processing and spreadsheets, and a digital audio workstation. All of these save data to Onedrive. This gives me another layer of data security and allows me to move to other machines.
The only problem is with B4A. I live with it by keeping a file explorer window open on another monitor where I can easily delete the folders within the objects folder. As Peter Simpson says, folders delete with no problem, so they don't appear to be locked.
It's not a big deal for me, but so far as I'm concerned, it's a quirk of B4A. Would be nice to have it fixed
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
For what it's worth . . .
I use numerous software and firmware development systems for various platforms along with a number of mechanical and PCB CAD, several hardware test and measurement programs, video editiing, word processing and spreadsheets, and a digital audio workstation. All of these save data to Onedrive. This gives me another layer of data security and allows me to move to other machines.
The only problem is with B4A. I live with it by keeping a file explorer window open on another monitor where I can easily delete the folders within the objects folder. As Peter Simpson says, folders delete with no problem, so they don't appear to be locked.
It's not a big deal for me, but so far as I'm concerned, it's a quirk of B4A. Would be nice to have it fixed
Wow, you've been a member since 2014, but today is your first ever post. Welcome to the first post brigade. You obviously use the forum a lot, thus finds all the answers that you are looking for without asking any questions 👏 👍 👏 👍

I do keep saying locked (when it's clearly not clocked), I basically mean owned. You are correct about one thing though. I am surprised that the IDEs can't delete the files/folders, as just highlighting them in explorer and hitting the delete key worked 100% of the time. But either way, it's all fixed now.

As I mentioned previously. I finally found out it was to do with my AV (even though it was disabled and had exclusions), but an uninstallation, clean, and re-installation of the AV fixed the issues I was having. I always excuse my B4X and VS folders from AV scans.
 
Upvote 0

juannybennett

New Member
Licensed User
Longtime User
Wow, you've been a member since 2014, but today is your first ever post. Welcome to the first post brigade. You obviously use the forum a lot, thus finds all the answers that you are looking for without asking any questions 👏 👍 👏 👍

I do keep saying locked (when it's clearly not clocked), I basically mean owned. You are correct about one thing though. I am surprised that the IDEs can't delete the files/folders, as just highlighting them in explorer and hitting the delete key worked 100% of the time. But either way, it's all fixed now.

As I mentioned previously. I finally found out it was to do with my AV (even though it was disabled and had exclusions), but an uninstallation, clean, and re-installation of the AV fixed the issues I was having. I always excuse my B4X and VS folders from AV scans.
Thanks :) Not using 3rd party AV on this machine. Just Windows Defender. I'm an occasional user of B4A to support my commercial hardware projects. I have to go through a learning curve every time. B4A is the best IDE that I use, in terms of usability. Just this one problem
 
Upvote 0

tonigau

Member
I have a secondary partition D: for all my data, has no UAC & is easy to selective backup.
This is also ideal for imaging the primary partition (OS drive C:) as its not bloated with data & setup a new PC from backups is easy too.
My apps installed to C:\Programs (more permissive than the default C:\Program files)

I manually backup to USB drive(s) & cloud drive.
For my dev PC it has no internet, no AV, no UAC, it's an old machine & is always responsive & boots quick.
I do get the issue of needing to delete the b4r object\src files(& arduino sketch cache), but that's just me playing with cpp lib files & the old one(different filename usually) won't compile.

Something I learned is don't put too much data in 1 high level folder, if the partition gets corrupted & it happens to be an entry for the main folder, expect difficulty recovering data from sub folders. (look at C:\users...) But then we all take a drive image or backup regularly - don't we?.
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
But then we all take a drive image or backup regularly - don't we?.
Me personally, yes.
  • My documents folder (with my code) is backed up three times per day. Twice during my breaks, and also at the end of my working day. I press a backup button and the folder backup starts running.
  • When I feel the urge to do so, I press a different backup button to the button above, and instead of just background up my documents folder, multiple pre-selected folders are backed up.
  • I leave my development laptop on every Sunday night, the c drive automatically gets imaged to an external device.
That's about it when it comes to backups. I also have both onsite (devices) and offsite (on my own personal server) backups. I don't use cloud services when it comes to anything personal of mine. From documents, to photos (except for select displays), to source code etc, absolute nothing personal is stored online in the cloud.
 
Upvote 0
Top