1

enter image description here

I uploaded local photos in drawable files. The photos are approximately 3 mb in size. Its showing this error. However The problem panel shows analizing for 15 minutes till now and it is still showing it. What could be the possible reason for such errors.

4 Answers4

3

Resource name must start with a small case letter or an underscore('_'). For more rules regarding resource naming convention, you can refer to the below-mentioned medium article. https://medium.com/@AkhilDad/a-designers-guide-for-naming-android-assets-f790359d11e5

2

Resource name must start with letter. You can't start image name with digits.

The reason you can't have a resource with a numeric name is because variable names cannot start with numbers.

Dharmender Manral
  • 1,504
  • 1
  • 6
  • 7
2

There are a few conventions used in resources:

  1. For resources that exist as separate files, they must be lower_case_underscore_separated. The appt tool makes sure that your files are only lower-case, because using mixed case can cause issues on case-insensitive filesystems.
  2. For resources declared only in values/... (attributes, strings, etc) the convention is generally mixedCase.
  3. There is a convention used sometimes to tag names with a "classification" to have simple namespaces. This is for example where you see things like layout_width and layout_alignLeft. In a layout file the attributes for both the View and the parent layout management are mixed together, even though they are different owners. The "layout_*" convention ensures that there are no conflicts between these names and it is easy to understand which entity the name impacts.

For more information here is the complete discussion. Are there conventions on how to name resources?

AlixaProDev
  • 472
  • 1
  • 5
  • 13
0

The error is actually because the resource name cannot start with a number. Resource name should start with a letter or underscore(_).