The size of apk inclusions can be reduced.
Open source address /shwenzhang/AndResGuard
A, introduced in the build.gradle file under the project update directory.
B, then create a new and-res-guard.gradle file under the app directory, and configure it under build.gradle as follows.
C, complete the above configuration, basically has been configured.
The and-res-guard.gradle file is as follows.
All resources accessed by getIdentifier need to be whitelisted.
Third-party sdk resource files such as AU, Aurora, sharesdk and Twitter need to be whitelisted.
Glide needs whitelisting or processing when loading resource text pictures.
Traverse and query all resources accessed through getIdentifier, and then add them to the white list.
You can use the command. /gradlewresguard [build type | flavor] or directly perform the following tasks.
We can get the following output path and get the following seven useful files:
Open source address /shwenzhang/AndResGuard
AndResGuard and walle multi-channel packaging
/CTO _ 1649900265/ Articles/Details/107456522
/my like _ 45/article/details/ 124303785