TheNativeScriptBook icon indicating copy to clipboard operation
TheNativeScriptBook copied to clipboard

CH7. android resources file name limitation

Open onldosalm opened this issue 7 years ago • 1 comments

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

onldosalm avatar Jul 02 '18 07:07 onldosalm

Thank you, @kheepan. We have massive changes coming to the book very soon. This is one of our original errors that didn't get caught in the first edition. Stay tuned for the updates, which will also include updates supporting NativeScript v4.1.

mikebranstein avatar Jul 03 '18 12:07 mikebranstein