Alex Hall created CLI-286:
-----------------------------

             Summary: platform add android doesn't have proper repository config
                 Key: CLI-286
                 URL: https://issues.apache.org/jira/browse/CLI-286
             Project: Commons CLI
          Issue Type: Bug
          Components: CLI-2.x
    Affects Versions: 1.4
         Environment: OSX High Sierra

NPM v6.0.0

Node v8.11.1

Java v1.8

Cordova v8.0.0
            Reporter: Alex Hall


Unclear on if this is the correct place to categorize this issue, but the fix 
is simple. 

By default, when setting up a new project: 

```

cordova create cordova com.example.test CordovaTest

cordova platform add android --save

```

The resulting build.gradle does not provide the appropriate google maven 
repository to pull from given the android 3.0 gradle plugin. 

 

According to: 
[https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration]

your gradle build script configuration for the Adroid 3.0 plugin should look 
something like:

```

buildscript {
     repositories {
     jcenter()
     maven \{ url "http://jcenter.bintray.com"}
     google() // <<---- HAD TO ADD THIS!!!
     }
}

````

 

I've listed the problem as minor since Android Studio immediately realizes the 
issue and even gives you the option to fix it automatically, but i've been 
hacking purely from the CLI and kept getting cryptic errors like: "unable to 
find valid certification path to requested target". 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to