I had the same error,
Try this one
what you can do regarding this error is to modify your config.xml by adding this line of code
<gap:plugin name="cordova-android-support-gradle-release" spec="https://github.com/dpa99c/cordova-android-support-gradle- release">
<variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
and on the targetSDKVersion improve it to 27, it will looks like
<preference name="android-targetSdkVersion" value="27" />
Hope this will serve your day.