I ran into this error too. My solution is to install cmdline-tools in android studio, Projects > More Actions > SDK manager, then go to SDK Tools and check Android SDK Command-line Tools.
Next time I start package, problem solved!