Android IDE (AIDE) Support Forum

How to slove R error

Hi i opened someone file in my aide now im having this R error so how can i slove this error. I have tryed to change the dependencies when i did that some of the error has gone but not every
I have try 19.4.0<>11.8.0<>15.0.0

You cant solve it by yourself. Your project probably has other issues; or the package name is not identical.

The R error is usually related to resources module. Sometimes it need to be checked in ‘raw’ folder.

  • Make sure all the file name inside raw folder only lowercase latin alphabet with no space and no symbol. (may be eclipse support unicode name, but I see in AIDE it not allow chinese char in file resource)
  • Check if it missing resource file (image, sound, binary file)
  • Kill AIDE, reopen AIDE and refresh build.

Delete Build file and run
If it continues delete all import I. Your activity and click on fix import when it shows “which R to import” select the one that bear your app package name

So there are some solutions:

  1. Delete build file and compile again.
  2. Close the app and reopen
  3. MOST IMPORTANT POINT: Check for any errors in any XML file or resources.
    I have observed that because of point 3 AIDE 99 per cent of time does not compile and have R errors!

In your MainActivity.java try to import R.java
Let’s say your package is " com.my.app; " then " import com.my.app.R; "