Android Question [Solved] compiletime.jar no longer works - Java file permission issue

weighment

Member
Licensed User
The very useful functionality from the compiletime.jar file generator stopped working when I installed B4A 10.2

original utility found here: https://www.b4x.com/android/forum/t...d-auto-increment-build-version.64183/#content

During the build of my project:
...
Running custom action. Error
main._appstart (java line: 60)
java.io.FileNotFoundException: ..\Files\compiletime.txt (Access is denied)
...

I rebuilt the compiletime.jar using the code shown in the example, and get the same error when the target file is just "compiletime.txt" (without the relative ..\Files\ path)
also fails when full path is specified "C:\Users\P\OneDrive\dev\ProjectIsNamed\Files\compiletime.txt"
however it works fine when the target file is "c:\temp\compiletime.txt"

Same issue when I run b4a as administrator.

Maybe a coincidental OneDrive folder permissions issue with Java at the same time I updated B4A, though project has always been there and I didn't update Java.

Somehow when b4a spawns the java task at the compile-time custom-action it no longer has access to the project folders.

Any ideas? Thanks in advance for taking a look.
 

weighment

Member
Licensed User
Solved. It turns out that Avast Antivirus was preventing compiletime.jar from writing to any file in the OneDrive folder. Timing was coincidental with B4A version update but unrelated. Once I whitelisted the behavior all is well. Many thanks for taking a look though.
 
Upvote 0
Top