APK works fine when downloaded from play store,but doesn't open locally

Of course before publishing a version,I have to try it on my phone,otherwise I might risk that more than 3000 people who currently have my app will be unable to use it.When I make an apk,I install it on my phone,but doesn’t open,simply says “Application stopped working” and closes,but when I upload that same apk to the Play Store,and download it from there,works perfectly.
Any help is appreciated.

Well, you should try to debug this, no other suggestions. To debug game on android device you can download android studio, create empty project, than launch your game on your device and attach this proces to android studio debugger. In console you will see many logs, some of them may help you understand your problem better. Hope it helps.