2

Getting what appears to be a simple error and I have no idea how to resolve it:

res/drawable/DefaultIcon.png: Invalid file name: must contain only [a-z0-9_.]

The problem with the error is apparent. DefaultIcon.png is already alphabetical. How do I resolve this strange bug so I can package my app for the app store?

Dan
  • 1,812
  • 3
  • 13
  • 27

1 Answers1

5

This regular expression tells that you have to use only lower-case alphabets, or 0-9 digits, or an underscore or a period (.).

Change the filename to all lowercases like defaulticon.png & it will work.

When I used a file name as DefaultIcon.png, I got the same error.

Then I renamed that file to all lower-cases alphabets & it worked fine.enter image description here

Prashant Saini
  • 3,539
  • 1
  • 10
  • 24
  • That was really it. They couldn't just say that haha. Thanks a million. – Dan Aug 21 '17 at 11:18
  • Well they said it all on console in that regex [a-z0-9_.]........ we just need to carefully look at every info.. 99% problems are solved by carefully looking at console messages :) – Prashant Saini Aug 21 '17 at 16:43
  • After hours of coding anyone would forget that a-z is not the same as A-Z and I'm glad someone caught it. – Dan Aug 21 '17 at 16:54