Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
948 views
in Technique[技术] by (71.8m points)

android - App Bundle build fails because of the sym_keyboard_feedback_delete.png file

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'.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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'

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...