Gradle problem

Hello folk,
Since upgrading my ionic cordova cli I could not build any android project. I guess this is due to the fact that in the new cli it uses gradle to build projects whereas in the past it used to use ant.
I dont know mush about gradle and its settings and since its parameters are set automatically, I dont know how could I fix them.
the error I receive is :
Could not parse POM

my guess is that since I live in Iran and google services are banned in my country I run into this problem.
If anyone could confirm the reason for my problem and help me to find a solution I would appreciate.
I would like to know if there is a way to build projects offline where it does not need to connect to Internet.
Thanks in advance