Skip to content

CH7. android resources file name limitation #8

@onldosalm

Description

@onldosalm

File-based resource names must contain only lowercase a-z, 0-9, or underscore

below error occured when using "-" in filename as in the book.

[18-07-02 15:55:34.276] Error detected during LiveSync on xxx for D:_workspace\nativescript\Tekmo. Error: Command gradlew.bat failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugResources'.

D:_workspace\nativescript\Tekmo\platforms\android\app\src\main\res\drawable-hdpi\couch-commander.png: Error: '-' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore
D:_workspace\nativescript\Tekmo\platforms\android\app\src\main\res\drawable-ldpi\couch-commander.png: Error: '-' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore
D:_workspace\nativescript\Tekmo\platforms\android\app\src\main\res\drawable-mdpi\couch-commander.png: Error: '-' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore
D:_workspace\nativescript\Tekmo\platforms\android\app\src\main\res\drawable-xhdpi\couch-commander.png: Error: '-' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore
D:_workspace\nativescript\Tekmo\platforms\android\app\src\main\res\drawable-xxhdpi\couch-commander.png: Error: '-' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore
D:_workspace\nativescript\Tekmo\platforms\android\app\src\main\res\drawable-xxxhdpi\couch-commander.png: Error: '-' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Get more help at https://help.gradle.org
    BUILD FAILED in 3s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions