Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict error between cordova-plugin-google-analytics and cordova-plugin-geolocation. #587

Open
gustavocomim opened this issue Mar 11, 2021 · 1 comment

Comments

@gustavocomim
Copy link

gustavocomim commented Mar 11, 2021

Hello guys.

When i have installed in my ionic project both plugins, cordova-plugin-google-analytics and cordova-plugin-geolocation, when i will compile my Android apk, exists an error on AndroidManifest.xml because i have duplicate entries, <uses-feature android:name="android.hardware.location.gps" android:required="true" /> for cordova-plugin-geolocation, because it has "GPS_REQUIRED": "true" in the package.json, and <uses-feature android:name="android.hardware.location.gps" /> for cordova-plugin-google-analytics, because does not have the GPS_REQUIRED variable available.

When i remove the android platform from my project and add again, we can see the duplicate entries.

And when i compile gradle catch the error Element uses-feature#android.hardware.location.gps at AndroidManifest.xml:77:5-66 duplicated with element declared at AndroidManifest.xml:74:5-90

My plugins versions are:
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-google-analytics": "^1.9.0",

I already tried to use <edit-config file="app/src/main/AndroidManifest.xml" mode="overwite"... entry in my config.xml, trying to overwrite one of them, i've tried merge the entries, without success.

Could you help me please?

Here is my full package.json

{
"name": "XXXXXXXX",
"description": "XXXXXXX",
"version": "4.4.5",
"author": "XXXXXXXXX",
"homepage": "XXXXXXXX",,
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "ngcc"
},
"private": true,
"dependencies": {
"@angular/common": "^11.0.0",
"@angular/core": "^11.0.0",
"@angular/forms": "^11.0.0",
"@angular/platform-browser": "^11.0.0",
"@angular/platform-browser-dynamic": "^11.0.0",
"@angular/router": "^11.0.0",
"@ionic-native/app-minimize": "^5.29.0",
"@ionic-native/app-version": "^5.29.0",
"@ionic-native/calendar": "^5.29.0",
"@ionic-native/camera": "^5.29.0",
"@ionic-native/code-push": "^5.29.0",
"@ionic-native/contacts": "^5.29.0",
"@ionic-native/core": "^5.29.0",
"@ionic-native/deeplinks": "^5.29.0",
"@ionic-native/diagnostic": "^5.29.0",
"@ionic-native/facebook": "^5.29.0",
"@ionic-native/firebase": "^5.29.0",
"@ionic-native/geolocation": "^5.29.0",
"@ionic-native/google-analytics": "^5.31.1",
"@ionic-native/google-maps": "^5.5.0",
"@ionic-native/in-app-browser": "^5.29.0",
"@ionic-native/keyboard": "^5.29.0",
"@ionic-native/launch-navigator": "^5.29.0",
"@ionic-native/market": "^5.29.0",
"@ionic-native/native-storage": "^5.29.0",
"@ionic-native/qr-scanner": "^5.29.0",
"@ionic-native/sign-in-with-apple": "^5.29.0",
"@ionic-native/splash-screen": "^5.29.0",
"@ionic-native/status-bar": "^5.29.0",
"@ionic/angular": "^5.4.4",
"@ionic/cli": "^6.4.0",
"@types/jwt-decode": "^3.1.0",
"br-mask": "0.0.7",
"code-push": "^3.0.1",
"cordova-android": "^9.0.0",
"cordova-browser": "^6.0.0",
"cordova-ios": "^5.1.1",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-advanced-http": "^3.1.0",
"cordova-plugin-androidx": "^1.0.2",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-app-version": "^0.1.9",
"cordova-plugin-appminimize": "^1.0.1",
"cordova-plugin-calendar": "^5.1.5",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-code-push": "^2.0.0",
"cordova-plugin-contacts": "^3.0.1",
"cordova-plugin-device": "2.0.2",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-facebook4": "^6.4.0",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-firebasex": "^7.0.2",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-google-analytics": "^1.9.0",
"cordova-plugin-googlemaps": "^2.7.1",
"cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git",
"cordova-plugin-inappbrowser": "^4.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^5.0.0",
"cordova-plugin-market": "^1.2.0",
"cordova-plugin-nativestorage": "^2.3.2",
"cordova-plugin-qrscanner": "^3.0.1",
"cordova-plugin-sign-in-with-apple": "^0.1.2",
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "2.4.2",
"cordova-plugin-whitelist": "1.3.3",
"cordova-plugin-zip": "^3.1.0",
"cordova-res": "^0.8.1",
"cordova.plugins.diagnostic": "^5.0.2",
"core-js": "^2.5.4",
"crypto-js": "^4.0.0",
"google-libphonenumber": "^3.2.15",
"ionic-keyboard-assist": "^4.0.2",
"ionic-plugin-deeplinks": "^1.0.20",
"ionic-selectable": "^4.7.1",
"jquery": "^3.5.1",
"jwt-decode": "^3.1.2",
"moment": "^2.29.1",
"ng-recaptcha": "^5.0.0",
"ngx-clipboard": "^14.0.1",
"ngx-filter-pipe": "^2.1.2",
"rxjs": "^6.6.2",
"smart-capitalize": "0.0.4",
"tslib": "^1.14.1",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.5",
"uninstall": "0.0.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1000.7",
"@angular-devkit/build-angular": "^0.1000.7",
"@angular-devkit/core": "^10.0.7",
"@angular-devkit/schematics": "^10.0.7",
"@angular/cli": "~11.0.1",
"@angular/compiler": "~11.0.0",
"@angular/compiler-cli": "~11.0.0",
"@angular/language-service": "~11.0.0",
"@ionic/angular-toolkit": "^2.3.3",
"@ionic/lab": "2.0.6",
"@types/jasmine": "^2.8.17",
"@types/jasminewd2": "~2.0.3",
"@types/jquery": "^3.5.4",
"@types/node": "~12.6.6",
"codelyzer": "^6.0.1",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~5.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.3",
"typescript": "~4.0.5"
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-geolocation": {
"GPS_REQUIRED": "true"
},
"cordova-plugin-nativestorage": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-firebasex": {
"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
"FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",
"ANDROID_ICON_ACCENT": "#FF00FFFF",
"ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "17.0.0",
"ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1",
"ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0",
"ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3",
"ANDROID_FIREBASE_PERF_VERSION": "19.0.1",
"ANDROID_FIREBASE_AUTH_VERSION": "19.1.0",
"ANDROID_CRASHLYTICS_VERSION": "2.10.1",
"ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1"
},
"cordova-plugin-contacts": {},
"cordova-plugin-app-version": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
"GOOGLE_API_KEY_FOR_ANDROID": "XXXXXXXX",
"OKHTTP_VERSION": "3.12.0",
"LOCATION_USAGE_DESCRIPTION": "Para encontrar a loja belle.club mais próxima de você"
},
"cordova.plugins.diagnostic": {
"ANDROID_SUPPORT_VERSION": "28.+"
},
"cordova-plugin-facebook4": {
"APP_ID": "1687361724729046",
"APP_NAME": "XXXXXXX",
"FACEBOOK_HYBRID_APP_EVENTS": "false",
"FACEBOOK_ANDROID_SDK_VERSION": "5.13.0"
},
"cordova-plugin-calendar": {
"CALENDAR_USAGE_DESCRIPTION": "Para sincronizar suas sessões com seu calendário",
"CONTACTS_USAGE_DESCRIPTION": "Para você indicar os seus amigos"
},
"cordova-plugin-appminimize": {},
"ionic-plugin-deeplinks": {
"URL_SCHEME": "espacolaser",
"DEEPLINK_SCHEME": "https",
"DEEPLINK_HOST": "evup.com.br",
"ANDROID_PATH_PREFIX": "/",
"ANDROID_2_PATH_PREFIX": "/",
"ANDROID_3_PATH_PREFIX": "/",
"ANDROID_4_PATH_PREFIX": "/",
"ANDROID_5_PATH_PREFIX": "/",
"DEEPLINK_2_SCHEME": " ",
"DEEPLINK_2_HOST": " ",
"DEEPLINK_3_SCHEME": " ",
"DEEPLINK_3_HOST": " ",
"DEEPLINK_4_SCHEME": " ",
"DEEPLINK_4_HOST": " ",
"DEEPLINK_5_SCHEME": " ",
"DEEPLINK_5_HOST": " "
},
"cordova-plugin-sign-in-with-apple": {},
"cordova-plugin-market": {},
"cordova-plugin-qrscanner": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-code-push": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-googlemaps": {
"LOCATION_WHEN_IN_USE_DESCRIPTION": "This app wants to get your location while this app runs only.",
"LOCATION_ALWAYS_USAGE_DESCRIPTION": "This app wants to get your location always, even this app runs in background."
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-google-analytics": {
"GMS_VERSION": "16.0.8"
}
},
"platforms": [
"browser",
"ios",
"android"
]
}
}
image

@victorsosa
Copy link
Collaborator

Need more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants