You have to exclude resources.apk.bk from McAfee Enterprise OnAccess scanning but the trick is to configure it properly and the method is confusing.
I struggled with this because I kept adding resources.apk.bk to the "On-Demand" exclusions but that won't work, you have to add it to the "On-Access" exclusions.
There are 2 ways to fix it. If you have permission to configure your own McAfee client then I provide instructions below. Otherwise you have to have your McAfee administrator fix it which I show below as well.
McAfee Admin Instructions:
This step should be performed on the McAfee Enterprise server by your McAfee Enterprise Admin. Add resources.apk.bk to the "On-Access" exclusions, make sure they know it's for "On-Access" and not "On-Demand".
Fix you can do yourself if you have permission
- Right-Click on the McAfee icon in your task bar and click on "McAfee Endpoint Security".
- Assuming it's password protected, login with the admin password.
- In the green bar near the top click the text "Threat Prevention"
- Click "Show Advanced" button on the right
- Click "On-Access Scan" on the left
- Scroll down a little further until you see the Exclusions box
- Click Add
- within the top input box type in
resources.apk.bk
then click "Ok"
- Click "Apply" at the top right.
You should now be able to rebuild your Xamarin Forms Android project without receiving the error.
NOTE!
Keep in mind, if you configure your McAfee yourself, depending on how your McAfee Enterprise is setup your configuration may be overwritten at any moment, because most McAfee Enterprise setups overwrite your own configurations every 5 minutes because they want to make sure everyone is applying a policy that management requires.