Ok, i found a solution.
I was using cordova-android: 6.3.0. I updated the version to 7.1.0 and then changed this line in the config.xml
before was:
Now i'm using:
This way, ionic cordova run android is working again without having to change those lines in build.gradle!