I am trying to build my app using the Android app bundle. The apk gets generated fine but the bundle doesn't due to a "reserved file or directory name 'res'". Oddly it singles out this drawable file which exists only in the Android pie (28) SDK folder. I'm not using it anywhere in my module.
sym_keyboard_feedback_delete.png
I'm using the latest gradle version (3.2.1) and compiling against Android Pie (28). Any ideas?
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':packageProductionReleaseBundle'.
> java.util.concurrent.ExecutionException: com.android.tools.build.bundletool.exceptions.BundleFileTypesException$FileUsesReservedNameException:
File 'root/res/drawable-hdpi/sym_keyboard_feedback_delete.png' uses reserved file or directory name 'res'.
I've figured out the problem. One of the libraries I am using had a dependancy on the Google Android Library » 4.1.1.4, which contains resource file sym_keyboard_feedback_delete.png and others that occupy the res directory.
Excluding this module from the library dependancy has solved this issue.
exclude group: 'com.google.android'
It looks like one your dependencies is not compiled as an AAR but instead just as JAR.
来源:https://stackoverflow.com/questions/53263832/app-bundle-build-fails-because-of-the-sym-keyboard-feedback-delete-png-file