Skip to content Skip to sidebar Skip to footer

How Should I Be Creating Strings In Androidstudio / Intellijidea?

I'm writing my layouts and every time i type in a @string/new it just warns me that the string reference does not exist, but doesn't show any helper to create it. I have to go to

Solution 1:

I haven't used the new Android Studio extension, as it doesn't appear to be stable enough for production use yet, but in plain old IntelliJ IDEA 12, if you use Alt-Enter on the red R.string.foo reference, the intention menu has "Create string resource" as an item. Selecting that intention brings up the dialog to add the string. From the dialog you can type in the string and select which resource filters to use (i.e. which strings.xml to add it to).


Post a Comment for "How Should I Be Creating Strings In Androidstudio / Intellijidea?"