Could not resolve com.android.tools.build:gradle:3.0.0. / Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle -3.0.0.pom'

when i run this commandionic cordova run android --device or ionic cordova run android --prod --release
this is the firts time i use ionic plz help me . thanks for reading

BUILD FAILED in 4s
(node:12008) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cm
d: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:3.0.0.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.0.0.
         > Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle
-3.0.0.pom'.
            > Could not GET 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0
.pom'.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.pro
vider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
output.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
(node:12008) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future,
promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

What is your ionic info output?

hello,
i have same the problem and this is my ionic info output

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-plugin-proxy : 1.5.6
@ionic/cli-utils        : 1.19.1
ionic (Ionic CLI)       : 3.19.1

System:

Node : v8.9.4
npm  : 5.6.0 
OS   : macOS Sierra

Environment Variables:

my proxy

Misc:

backend : pro

Thank you for your help

@bbarascou You have to run the command in your project directory, not somewhere else.

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-plugin-proxy : 1.5.6
@ionic/cli-utils        : 1.19.1
ionic (Ionic CLI)       : 3.19.1

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : android 7.0.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.9.4
npm               : 5.6.0 
OS                : macOS Sierra
Xcode             : Xcode 8.3.3 Build version 8E3004b

Can you manually open this URL the error message says that can not be opened:
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle%20-3.0.0.pom
?

404 on your link but I can download https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom in chrome.
I find this https://www.cresco.co.jp/blog/entry/2014/ but i don’t have any folder located here : {your-home-directory}.AndroidStudio3.0\system\tasks\cacerts

Oh sorry, that was a copy/paste error. Strange that the CLI or the Android build process can not get the resource while you can manually open it.

PS C:\Users\duc.lt\Desktop\Learn\LearnIonic\learn> ionic info

cli packages: (C:\Users\duc.lt\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.6
    Cordova Platforms  : android 7.0.0 plugins
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.2.1
    npm               : 5.3.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : D:\Android\sdk

Misc:

    backend : pro