Issue when running ionic cordova run android with Android Studio 3.0


I’m having an issue when i run “ionic cordova run android” after updating Android Studio.

I already find how to work around this problem with this solution:

Unable to run Ionic app after update to Android Studio 3.0

However, when i do it this way, i have to run or build android and get an error, and after getting this error, change the file build.gradle in android studio in the way is suggested in the topic above.

I wanted to know if someone knows how to make “ionic cordova run android” command running as it did before, without having to enter in Android Studio to correct the build.gradle

Thanks for helping!

--------------------------------------------- EDIT ------------------------------------------------

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:

<preference name="android-minSdkVersion" value="16" />

Now i’m using:

<preference name="android-minSdkVersion" value="19" />

This way, ionic cordova run android is working again!