I am moving a new question from this one implementation 'com.android.support:appcompat-v7:28.0.0' because i solved my problem thanks to the answers but now my app is continuously crashing. This is what happens: i build my apk, i send it to the emulator and to my device (galaxy a6+) and i get a "The program has been shut down" (don't know if terms are technically correct, i am translating from italian) message after installing succesfully. On a galaxy s5 the message is "error during data analisys" and never get to install it.
this is my build.gradle after the changes made thanks to the answers on this site : https://www.dropbox.com/sh/1vjmrh196bdy5gn/AADW-DG1YB10s-Csw_UrZtuYa?dl=0
thank you for any clue.