title: ionic build error: Could not resolve com.android.tools.build:gradle:1.5.0
body: <p>I am trying to build an ionic android app. I am following this tutorial <a href="https://www.youtube.com/watch?v=qVOwGyQB3DQ" rel="nofollow noreferrer">Cordova and Ionic | Android HTML5 App Development Tutorial</a>
  to create my first ionic app. Although the operating system that I have in linux mint 17.3.</p>
  <p>Everything is working except for the last command i.e. sudo ionic build android. I am getting following error log:</p>
  <pre><code>abc@abc-PC14 ~/workspace/public_html/ionic/hellowWorld $ sudo ionic build android
  
  You have been opted out of telemetry. To change this, run: cordova telemetry on.
  Running command: /home/scoders/workspace/public_html/ionic/hellowWorld/hooks/after_prepare/010_add_platform_class.js /home/scoders/workspace/public_html/ionic/hellowWorld
  add to body class: platform-android
  ANDROID_HOME=/home/scoders/android-sdk-linux
  JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring root project 'android'.
  &gt; Could not resolve all dependencies for configuration ':classpath'.
     &gt; Could not resolve com.android.tools.build:gradle:1.5.0.
       Required by:
           :android:unspecified
        &gt; Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom'.
           &gt; hostname in certificate didn't match: &lt;repo1.maven.org&gt; != &lt;199.27.79.209&gt;
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  
  Total time: 2.364 secs
  Error: Error code 1 for command: /home/scoders/workspace/public_html/ionic/hellowWorld/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/scoders/workspace/public_html/ionic/hellowWorld/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
  </code></pre>
  <p>First i assumed that it might be SSL gradle error and tried to fix using <a href="https://github.com/arteme/gradle-trust-all" rel="nofollow noreferrer">gradle-trust-all</a></p>
  <p>But it is still giving the same error.</p>
  <p>How to resolve this error..?</p>