The solution of Android package error

Before, when I was working on the company’s APP, the functions had been fully realized and it could also run normally on the mobile phone, but it kept reporting errors when packaging

\build\intermediates\res\ resources-anzhi-debug-ap_ ‘specified for property ‘resourceFile’ does not exist, so I found a lot of information on the web.
Some say that the version of SDK is lower than the version of ADT. It is suggested to upgrade the SDK version. Some say that an option of the Android Studio setting is removed.
Finally on the net or found a solution to the code, now record.
In fact, we only need to modify the build.gradle code

BuildTypes {
release {
does not display the LOG/* * * */confused
/* * * */

/minifyEnabled false Zipalign optimization * * * */
zipAlignEnabled true
Remove useless resource files/* * * */
shrinkResources true
proguardFiles getDefaultProguardFile (‘ proguard – android. TXT), ‘proguard – rules. Pro’
}
The debug {

minifyEnabled false shrinkResources false
proguardFiles getDefaultProguardFile (‘ proguard – android. TXT), ‘proguard – rules. Pro’

}}

ShrinkResources = false Release ShrinkResources = false Interested can go to the Internet to check the reason.

The Android packaging problem is solved.

It’s as simple as that.


Read More: