Android Question b4a compile error The process cannot access the file BlahBlaH because it is being used by another process.

MrKim

Well-Known Member
Licensed User
Longtime User
File Provider example HERE works perfectly. I have added appropriate code to my app (which is B4a only, not B4x pages) and got it working fine. Added appropriate text to the manifest as shown in the link.
HOWEVER, when I try to compile I get the error:
B4X:
B4A Version: 13.10
Parsing code.    (0.43s)
    Java Version: 14
Building folders structure.    Error
The process cannot access the file 'D:\Android\B4AProjects\BlahBlah\Objects\res\xml' because it is being used by another process.
I solved this issue by copying the provider_paths file from the FileProvider\B4A\Objects\res\xml directory in the file provider app but was deleted on compile and I got the same error.
I remembered from many years ago having to add a file to an Android app and mark it as read only to prevent deletion.
So I did that and now it compiles and works just fine but I am wondering if I am missing something/doing something wrong?
Seems like it should generate the provider_paths file as it does in the example?
 
Solution
I remembered from many years ago having to add a file to an Android app and mark it as read only to prevent deletion.
You know, this app is so old it may be one of the ones that the directory got marked as read only! Any way I turned that off and that seems to have resolved the issue.

Erel

B4X founder
Staff member
Licensed User
Longtime User
I remembered from many years ago having to add a file to an Android app and mark it as read only to prevent deletion.
This is no longer needed. The XML file is created during compilation with the call to CreateResource in the manifest editor. You need to find out why the file was locked. Maybe a backup service or antivirus.
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
I remembered from many years ago having to add a file to an Android app and mark it as read only to prevent deletion.
You know, this app is so old it may be one of the ones that the directory got marked as read only! Any way I turned that off and that seems to have resolved the issue.
 
Upvote 0
Solution
Top