In order to install your illicit Pokémon APK, you'll have had to enable the "Unknown sources" toggle under Security settings. That's the switch which is disabled by default on all Android phones and prevents apps from being installed from places other than the Google Play Store.

Maybe you wanted to play Pokémon Go in a country where it's not officially available yet. Maybe you installed an APK from somewhere that's not the Google Play Store to do that. We're not gonna judge you.

Some Samsung phones will automatically toggle the "Unknown sources" back off once you've installed an APK from elsewhere. But most other Android phones don't, and it's a good idea to keep this setting switched off in case a rogue website or message pushes you towards a dodgy APK.

It's worth noting that toggling this switch won't do anything to apps you might've already installed from outside the Play Store, including Pokémon Go. So if you have downloaded a version infected with malware, the setting won't help you out — it'll just block future app installs from outside the Play Store.

To check "Unknown sources" is off, go to Settings > Security (or Settings > Lock screen & security on Samsung phones) and scroll down to find the option.

Now you can get back to scooping up Pokémon and capturing gyms.