Code Monkey home page Code Monkey logo

Comments (9)

nickforddev avatar nickforddev commented on August 29, 2024 15

I am experiencing the same issue, same versions. Also using phonegap-plugin-push.

Execution failed for task ':mergeDebugResources'.
> [string/google_app_id] /Sites/rafipayment_frontend/platforms/android/res/values/strings.xml	[string/google_app_id] /Sites/rafipayment_frontend/platforms/android/build/generated/res/google-services/debug/values/values.xml: Error: Duplicate resources

Edit: I've tried removing the Android platform, also tried removing and installing this plugin and phonegap-plugin-push in different orders.

I was eventually able to get phonegap build to run, by deleting the following from android.json:

"res/values/strings.xml": {
    "parents": {
        "/resources": [
            {
                "xml": "<string name=\"google_app_id\" translatable=\"false\">85075801930</string>",
                "count": 1
            }
        ]
    }
}

...along with the corresponding entry in strings.xml, but I honestly don't know what side effects that will have and it seems like a very hacky solution at best.

from cordova-plugin-firebase-analytics.

chemerisuk avatar chemerisuk commented on August 29, 2024 6

This is a trash from a some other plugin. It will be ok, because this constant value is generated from your 'google-services.json' now

from cordova-plugin-firebase-analytics.

emyymk avatar emyymk commented on August 29, 2024 2

Thank you for your response, chemerisuk.

Well. I started all again, because I was using an old version of plugins.

And now I have this msg error similar to this issue, but i am using phonegap-plugin-push.

What went wrong:
A problem occurred configuring root project 'android'.
Cannot add task ':processDebugGoogleServices' as a task with that name already exists.

After dealing with some msg erros, my bundle.graddle is now:

buildscript {
    repositories {
           jcenter()
           mavenLocal()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

dependencies {
    compile 'com.google.android.gms:play-services:11.0.+'
    compile 'com.google.android.gms:play-services-gcm:11.0.+'
}

apply plugin: 'com.google.gms.google-services'

My project.properties

target=android-25
android.library.reference.1=CordovaLib
cordova.system.library.1=com.google.firebase:firebase-core:11.0.+
cordova.gradle.include.1=cordova-plugin-firebase-analytics/coop-build.gradle
cordova.gradle.include.2=phonegap-plugin-push/coop-push.gradle
cordova.system.library.2=com.android.support:support-v13:23+
cordova.system.library.3=com.google.android.gms:play-services-gcm:11.0.+
cordova.system.library.4=me.leolin:ShortcutBadger:1.1.14@aar
  • I have already remove/add Android platform
  • I have tried with 'com.google.gms:google-services:3.0.0' and 'com.google.gms:google-services:3.1.0'

Please, do you know how can i solve this?

from cordova-plugin-firebase-analytics.

chemerisuk avatar chemerisuk commented on August 29, 2024

Read your logs carefully. I believe you have a dup string in resources, may be other than google_app_id

from cordova-plugin-firebase-analytics.

nickforddev avatar nickforddev commented on August 29, 2024

Fair enough, it does appear to be working without issue. Thanks!

from cordova-plugin-firebase-analytics.

ravikumarthuta avatar ravikumarthuta commented on August 29, 2024

now i am facing same problem.what is the solution please let me know.

from cordova-plugin-firebase-analytics.

FavoriteFave avatar FavoriteFave commented on August 29, 2024

@nickforddesign this worked for me. thank you!

from cordova-plugin-firebase-analytics.

eswarn24 avatar eswarn24 commented on August 29, 2024

@nickforddesign Not sure, but the steps you provided worked for me.

I was working in a project to completely upgrade a cordova project & plugins to latest version

In my case, I was using Push services in GCM and used to build the project directly in android studio rather than cordova build (Though not recommended).

Since google-service.json was introduce in firebase rather than GCM, it is mandatory for latest push plugin in cordova to build android projects.

So, I migrated the project to firebase and downloaded latest google-service.json from console portal. I included it in root directory of cordova project and during build process I encountered this error.

Your solution saved my time rather than banging my head on this issue

Thank you!!

from cordova-plugin-firebase-analytics.

RiteshAryal avatar RiteshAryal commented on August 29, 2024

I still have got the same issue.

Please suggest

from cordova-plugin-firebase-analytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.