Unable to build to Android platform - all projects

I’ve been learning Unity recently, and have created a few projects which run ok within Unity.
However, when I try to build to Android, I get the same error for each which seems to indicate an issue with my environment somewhere, but I have no idea how to fix:

In each case, the console shows…

  • What went wrong:
    Execution failed for task ’ ProcessReleaseResources’
    Android resource linking failed
    Output: error: failed to open APK: Invalid file

Further down, the console shows a number of exceptions like…

“Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.1.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only”

Can anyone give me an idea of how to fix this?
I’m using Unity 2019.1.0f2 on Windows 10

Ok, in case anyone else gets this issue, I got this working by:

  1. uninstalling everything
  2. installing android studio
  3. installing unity without android sdk

When building for the first time, unity automatically found the android sdk installed by Android studio which worked fine