0

After generate signed APK i find this error message.

G:\MyApplication\app\src\main\res\values\strings.xml: 
  Error: switch is not a valid resource name (reserved Java keyword)
Zoe
  • 27,060
  • 21
  • 118
  • 148
Ismail Hamdach
  • 127
  • 3
  • 8
  • 1
    Can you please elaborate on how you arrived at this error? – crenshaw-dev May 26 '18 at 00:55
  • just after i do generate signed my apk it dont finished and give me that message – Ismail Hamdach May 27 '18 at 13:01
  • Possible duplicate of [Error:Error: try is not a valid resource name (reserved Java keyword)](https://stackoverflow.com/questions/48644785/errorerror-try-is-not-a-valid-resource-name-reserved-java-keyword) – Zoe May 27 '18 at 13:45

1 Answers1

-1

You probably have a resource in that file with the name "switch", which is not allowed. Rename it to something else and that should work fine.

Pierre
  • 15,865
  • 4
  • 36
  • 50
  • Not sure why I'm being downvoted, this is the correct answer. "Switch" cannot be used as a resource name because the resource names are used as Java variables in the R.java and "switch" is a reserves keyword in java... – Pierre Aug 02 '19 at 17:37