简体   繁体   中英

Exclude folder from APK in Android Studio

I've included a production folder in the root of my project, after building the APK and opening it as an archive, I've noticed that the production folder has not been included.

Am I right/safe to assume that any un-referenced files/folders are automatically excluded from the APK or should I be using some sort of configuration file to specify an exclusion list?

I would phrase it more as "only stuff in src/ might ever get included in an APK, for a conventional Android Studio project".

If you create random other directories, those will be ignored, unless you specifically do something in build.gradle to try using them (eg, as an alternative location for assets/ ).

IOW, the contents of an APK come from a whitelist, not a blacklist.

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