简体   繁体   中英

Issue with building Android Bundle - throws error “File 'root/lib/commons-io-2.4.jar' uses reserved file or directory name 'lib'”

I have recently added support for 64-bit devices on my android app, making me resorting to build the app into bundle instead of apk (since the apk file size is over 100mb). When I did that, I get the following error:

File 'root/lib/commons-io-2.4.jar' uses reserved file or directory name 'lib'.

The problem is, I can't find any commons-io anywhere in the code, and its not declared as a dependency in build.gradle file in the main app project or any of the modules. I can only find commons-io.2.4 under External Libraries. I tried different things to try and to remedy this issue (clean/rebuild project, invalidate caches and restart, convert all 'compile' into 'implementation', etc), nothing seems to do the trick. Does anyone have any idea on how to get past this and build the app into a bundle? Any input would be greatly appreciated!

I had the same issue. I fixed it by following these steps:

1) add the commons-io-2.4.jar to your libs directory

2) remove this line from your dependencies

implementation 'org.apache.directory.studio:org.apache.commons.io:2.4'

3) add this line

implementation files('libs/commons-io-2.4.jar')

4) synk gradle and rebuild project

PS: I don't think it's the right way to fix the issue, but it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM