Android Question [ Solved ] Could not find a part of the path R.java

Sasuke Sama

Active Member
Licensed User
So i formated my PC and now when i try to compile any project im getting :


B4A Version: 8.50
Parsing code. (0.01s)
Building folders structure. (0.01s)
Compiling code. (0.03s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. Error
Could not find a part of the path 'G:\mustafapx\Android\TV\Soft link\Objects\gen\seven\zero\isl\R.java'.

it only compiled one time but after that kepp getting this

also when i try to create a new project and compile it im getting

B4A Version: 8.50
Parsing code. (0.00s)
Building folders structure. (0.02s)
Compiling code. (0.01s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. (0.12s)
Compiling debugger engine code. (0.79s)
Compiling generated Java code. Error
javac 1.8.0_201
javac: file not found: gen\b4a\example\R.java
Usage: javac <options> <source files>
use -help for a list of possible options

This error usually happens when you save the project under a restricted folder such as "Program Files".

i tried to put the project in every partition but still the same
also tried to reinstall the jdk but no luck
B4I and B4J works fine only B4A


No idea why
any help please?
 
Last edited:

jimmyF

Active Member
Licensed User
This error usually happens when you save the project under a restricted folder such as "Program Files".
I believe this is a read-only folder so don't store your projects there.
 

jimmyF

Active Member
Licensed User
Well it tells you what files are missing.
Assuming you have set your Paths Configuration properly then look in your project folders for the missing file.
But if the project folders are read-only, the R.java file will not be generated, I believe.

Not sure about this so the Java people will know more.

But check your read-only status on folders and sub-folders.
 

Sasuke Sama

Active Member
Licensed User
Are you using B4A Sdk Manager to manage Android SDK?
yes i do
i solved it tho
it looks like the windows defender in the latest windows 10 update corrupts the javac file or block it or something like that
i hade to re formate the pc and disable the windows defender using edit group policy once booted into windows
if you tried to compile an app before disabling it then you have to format the PC again
it also happend on other pc so looks like its a common issue
Hope this helps somebody out there
 

AlexOfOz

Member
Licensed User
yes i do
i solved it tho
it looks like the windows defender in the latest windows 10 update corrupts the javac file or block it or something like that
i hade to re formate the pc and disable the windows defender using edit group policy once booted into windows
if you tried to compile an app before disabling it then you have to format the PC again
it also happend on other pc so looks like its a common issue
Hope this helps somebody out there
Hello. Just to let you know that I have just encountered this exact problem. After reading through this post, I couldn't find anything wrong, especially since I successfully compiled only an hour ago. So finally I simply saved my work, shut down my laptop, restarted fresh and successfully compiled my program. I have no idea what changed apart from restarting the laptop. But the program is working now.
 

Sasuke Sama

Active Member
Licensed User
Hello. Just to let you know that I have just encountered this exact problem. After reading through this post, I couldn't find anything wrong, especially since I successfully compiled only an hour ago. So finally I simply saved my work, shut down my laptop, restarted fresh and successfully compiled my program. I have no idea what changed apart from restarting the laptop. But the program is working now.
Im probably the most person who faced this issue in here so let me help you
Pro tip : DELETE the entire android sdk from ur pc.
Download it again
Make a copy for backup
Set the sdk folder and your b4a projects folder as excluded from Windows defender or better disable windows defender all together.
The thing is windows defender go crazy on some sdk files and corrupt theme
 
Top