If you have ever seen an error like below, we have fixed this and got it resolved. The error and solution is like as below.
Invoke-customs are only supported starting with android o (--min-api 26)
Modify top level build.gradle file to add following lines
apply plugin: 'com.android.application'