Is it possible to create subfolder structures inside main res folders, especially in drawable folder using Gradle?
I have attempted this so far
sourceSets {
main {
res.srcDirs = [
"/src/main/res/drawable-xhdpi/actionbar_items",
"/src/main/res/drawable-xhdpi/intro",
"/src/main/res/drawable-xhdpi/loading_screen",
"/src/main/res/drawable-xhdpi",
"/src/main/res",
]
}
}
When I rebuild the project however I get this Gradle build error message something like this:
Error:(39, 23) No resource found that matches the given name (at 'icon' with value '@drawable/app_icon').
Error:(40, 24) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(42, 24) No resource found that matches the given name (at 'theme' with value '@style/AppTheme').
Error:(45, 28) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(50, 28) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(55, 28) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(73, 28) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Users/adrian/adt-bundle-mac-x86_64-20140702/sdk/build-tools/android-4.4W/aapt package -f --no-crunch -I /Users/adrian/adt-bundle-mac-x86_64-20140702/sdk/platforms/android-19/android.jar -M /Users/adrian/Development/alstom_framework/app/build/intermediates/manifests/debug/AndroidManifest.xml -S /Users/adrian/Development/alstom_framework/app/build/intermediates/res/debug -A /Users/adrian/Development/alstom_framework/app/build/intermediates/assets/debug -m -J /Users/adrian/Development/alstom_framework/app/build/generated/source/r/debug -F /Users/adrian/Development/alstom_framework/app/build/intermediates/libs/app-debug.ap_ --debug-mode --custom-package com.hiddenltd.framework -0 apk --output-text-symbols /Users/adrian/Development/alstom_framework/app/build/intermediates/symbols/debug Error Code: 1 Output: /Users/adrian/Development/alstom_framework/app/build/intermediates/manifests/debug/AndroidManifest.xml:35: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/app_icon'). /Users/adrian/Development/alstom_framework/app/build/intermediates/manifests/debug/AndroidManifest.xml:35: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name'). /Users/adrian/Development/alstom_framework/app/build/intermediates/manifests/debug/AndroidManifest.xml:35: error: Error: No resource found that matches the given name (at 'theme' with value '@style/AppTheme'). /Users/adrian/Development/alstom_framework/app/build/intermediates/manifests/debug/AndroidManifest.xml:43: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name'). /Users/adrian/Development/alstom_framework/app/build/intermediates/manifests/debug/AndroidManifest.xml:48: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name'). /Users/adrian/Development/alstom_framework/app/build/intermediates/manifests/debug/AndroidManifest.xml:52: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name'). /Users/adrian/Development/alstom_framework/app/build/intermediates/manifests/debug/AndroidManifest.xml:70: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name').
This means to me that the gradle sees only the res folders specified by me in app.gradle file ? Therefore I added the rest of it to the app.gradle and same error occurs... Can anyone help please ....