IntelliJ IDEA 13.1.0 Web Help

IntelliJ IDEA provides a number of facilities for managing resources used in Android applications. In the project view, resource definition files are shown grouped into folders below the res directory. Resources are accessed through the class, which is generated upon project creation and re-generated after each Save. In the project view, is displayed in the gen folder below the relevant destination package.


The following coding assistance is provided:

  • Basic code completion.
  • Code completion for various resource types, including alternate resources.
  • Syntax and error highlighting.
  • Find usages.
  • Code completion when referencing resources from other resources.
  • Integration between the resources and
    • Adding a reference to a newly created resource automatically.
    • Find usages from and navigation to the usages from the Find tool window.
    • Navigation between a reference to a resource in and the resource definition by clicking the Go to icon goto_declaration.png in the left gutter area.
    • Quick fixes including resource creation upon reference failure.
    • Code completion for referencing Android SDK resources.
To create a resource definition file
  1. In the Project view below the res, locate the folder with the resources of the desired type or create a new folder.


    Find the list of resource types in the Android documentation.

  2. Right-click the relevant folder and on the context menu, choose New | File.
  3. in the dialog box that opens, type the name of the new definition file with the extension /xml.


    Follow the Android documentation naming guidelines.

  4. To enable coding assistance, in the root element, specify the schema as the value of the xmlns:android field.
  5. Populate the resource definition file as necessary.

See Also




Web Resources: