Well I should have started using proper debug tools before. I was getting this error:
FATAL EXCEPTION: main
java.lang.VerifyError: Verifier rejected class com.onesignal.NotificationRest
I don’t use the Push Notifications component anyways and I read that it is deprecated, so after deleting it the problem is solved.
Thank you Ibrahim and Taifun for your time!