Camera crash android

Hey everyone, i’ve developed an app that should acces at the camera for opening the camera or getting a photo from the photo library, i’ve used the cordova plugin camera and if i test the app built with ionic (so android-debug.apk) there aren’t problems but if i test the signed apk (built with android studio) if i want to chose a picture from the photo library there aren’t problems but if i want to open the camera the app closes and i get the message “The app APP NAME was interrupted”.
How can i solve this problem?