Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
894 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 Reply

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'

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...