question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not work for the last cordova version 8.0.0

See original GitHub issue

Im trying a simple cordova project executing the next comands

cordova create map com.map.org Map
cordova platform add browser
cordova platform add android
cordova plugin add cordova-plugin-googlemaps \
    --variable API_KEY_FOR_ANDROID="..." 

i put my api key of course , then when i trie to build android

cordova build android

shows the next error

ap@debian:/opt/ap/www/mapapi$ cordova build android
cp: copyFileSync: could not write to dest file (code=ENOENT):/opt/ap/www/mapapi/platforms/android/res/xml/config.xml

Parsing /opt/ap/www/mapapi/platforms/android/res/xml/config.xml failed
(node:18725) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/opt/ap/www/mapapi/platforms/android/res/xml/config.xml'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:29 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
GregFunteracommented, Feb 3, 2018

Hi, Fixed mine with the same issue

in your platforms/android/build.gradle

add this maven { url “https://maven.google.com” }

allprojects { repositories { jcenter() maven { url “https://maven.google.com” } } }

Also check your dependencies should be like this:

dependencies { compile fileTree(dir: ‘libs’, include: ‘*.jar’) // SUB-PROJECT DEPENDENCIES START debugCompile(project(path: “CordovaLib”, configuration: “debug”)) releaseCompile(project(path: “CordovaLib”, configuration: “release”)) compile “com.google.android.gms:play-services-maps:11.8.0” compile “com.google.android.gms:play-services-location:11.8.0” // SUB-PROJECT DEPENDENCIES END }

And in your platforms/android/project.properties target=android-26 android.library.reference.1=CordovaLib cordova.system.library.1=com.google.android.gms:play-services-maps:11.8.0 cordova.system.library.2=com.google.android.gms:play-services-location:11.8.0

followed this solution: https://stackoverflow.com/questions/47244237/gradle-failed-to-resolve-com-google-android-gmsplay-services-auth11-6-0?rq=1

1reaction
sean-hillcommented, Feb 19, 2018

So I fixed this by replacing these lines in my build.gradle file:

// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
    repositories {
        mavenCentral();
        jcenter()
    }
}

With

// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

Now I’m presented with another problem, and I’m working on that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cordova Android 8.0.0 Released!
We are happy to announce that we have just released Cordova Android 8.0.0! This is one of Cordova's supported platforms for building Android ......
Read more >
After upgrading cordova version from 8.x.x to 9.0.0 ...
I'd try first upgrading to the latest CLI and then re-adding the cordova-android platform. If cordova platform remove android doesn't work ...
Read more >
Failed to fetch platform cordova-android@^8.0.0 in Cordova
After many attempts, I decided to give it a last try and run the cordova platform add ios command once again, and incredibly...
Read more >
Cordova 8.0.0 dont build any platform (with Ionic)
It says “Done!” but I don't see anything on C:\Users\username\projectname\platforms. Cordova version: 8.0.0. Ionic version: 3.9.2.
Read more >
cordova
Cordova command line interface tool. Latest version: 11.0.0, last published: a year ago. Start using cordova in your project by running `npm ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found