Closed
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info
in your project folder or by inspecting the package.json
of the project):
- CLI: 6.2.0
- Cross-platform modules: Not applicable
- Android Runtime: 6.2.0
- iOS Runtime: Not applicable
- Plugin(s): Not applicable
Describe the bug
Currently all values-v directories from <path to project's App_Resources>/Android/src/main/res
are included in the native project. The purpose of these directories is to separate the resources and features available for different SDKs. In case you build the application with SDK 28 for example, the resources for SDK 29 shouldn't be included in the project as probably they contain a resource usage that is not buildable with SDK28.
To Reproduce
- Create new project:
tns create appValuesIssue --js
- Open the newly created project and copy
appValuesIssue/app/App_Resources/Android/src/main/res/values-v21/
toappValuesIssue/app/App_Resources/Android/src/main/res/values-v29/
- Build the project:
tns build android --compileSdk 28
Build fails with error:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
<project dir>\platforms\android\app\src\main\res\values-v29\styles.xml:5:5-7:13: AAPT: error: style attribute 'android:attr/forceDarkAllowed' not found.
Command gradlew.bat failed with exit code 1
- Check the
appValuesIssue/platforms/android/app/src/main/res/values-v29/
dir - it will be there, while in fact, it shouldn't.
Additional context