Duplicate resources on the "ionic cordova build android" command. Firebase Plugin

I am creating a new android app with the following plugins and commands. Cordova plugin adds cordova-plugin-fcm, ionic cordova build android. An error message appears:

Parsing json file: /home/faichi/palav-ui/platforms/android/google-services.json
        :generateDebugResources
        :mergeDebugResources
        [string/google_app_id] /home/faichi/palav-ui/platforms/android/res/values/strings.xml   [string/google_app_id]
        /home/faichi/palav-ui/platforms/android/build/generated/res/google-services/debug/values/values.xml: Error:
    Duplicate resources
    :mergeDebugResources FAILED

    BUILD FAILED

    Total time: 1.683 secs

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':mergeDebugResources'.
    > [string/google_app_id] /home/faichi/palav-ui/platforms/android/res/values/strings.xml [string/google_app_id]
    /home/faichi/palav-ui/platforms/android/build/generated/res/google-services/debug/values/values.xml: Error:
    Duplicate resources

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Error: /home/faichi/palav-ui/platforms/android/gradlew: Command failed with exit code 1 Error output:
    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':mergeDebugResources'.
    > [string/google_app_id] /home/faichi/palav-ui/platforms/android/res/values/strings.xml [string/google_app_id]
    /home/faichi/palav-ui/platforms/android/build/generated/res/google-services/debug/values/values.xml: Error:
    Duplicate resources

      

I tried to remove duplicate values ​​in android \ res \ values ​​\ strings.xml but every time it returns and displays the same error.

Is this the right way to create a cordova based app using bash fire notification service?

+3


source to share





All Articles