Android IDE (AIDE) Support Forum

R.java file error

In my androidx app sometimes aide automatically deletes the r.java file and sometime whenever I use the refresh build option under the project section it deletes th r.java file and I got this error.

rebuild your ptoject

Please read my post carefully, I said it automatically deletes R.java file when I refresh/rebuilt my project @ofprogrammer

Can you show your full activity? Are you using androidx? Android x is not officially supported by aide yet.

delete import R,delete folder build. finaly rebuild

Yes I am using Androidx. Can you please tell me if somehow I can use androidx, as I want to use inmobi ads and it needs androidx to run. Please help
Thanks in advance @floresblanco25

I tried it but not working :expressionless:

Ok do as I do, when i wanna use libraries in AIDE, I always use the last old compatible version of that library, inmobiads version 7.2.8 compile with no errors, check the screenshot attached, if you still got errors, in your build gradle, check that everything is not above 27.1.1 version.

Thanks a lot @floresblanco25 it really helped me a lot

1 Like

As a reference for future errors, before handling these R errors, look through the errors to find one that isn’t related to R. For example, a wrong string in an xml file will cause the aapt to fail hence the R file won’t be generated.

3 Likes

Noted bro. and thanks for the suggestion it helped. :+1:

2 Likes