Open wirendy opened 6 years ago
I ran in to something similar when converting my project. I found the easiest solution was to remove the platform, make sure the android directory is completely gone) and then re-add it. I might have removed and re-added all my plugins too, I don't recall.
The bottom line is that you want to start with a clean slate, so that there is no leftover stuff from previous builds / releases.
Also make sure to add android@7.1.1 (as of this writing)
@wirendy there are other plugins you are including that are conflicting with this one, for instance:
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.system.library.2=com.android.support:support-v4:26.+
cordova.system.library.3=com.android.support:support-v13:25.1.0
You see how you are including the same support library multiple times? Check for the other plugins you are using, they should be able to set the version of the support library you are using. If not let me know the plugin names and maybe I'll send a PR.
The same for me. Ionic v4
`
<plugin name="cordova-plugin-device" spec="^2.0.2" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.3" />
<plugin name="cordova-plugin-facebook4" spec="^3.1.0">
<variable name="APP_ID" value="1241" />
<variable name="APP_NAME" value="testApp" />
<variable name="FACEBOOK_ANDROID_SDK_VERSION" value="4.37.0" />
</plugin>
<plugin name="cordova-plugin-datepicker" spec="^0.9.3" />
<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<config-file parent="NSPhotoLibraryAddUsageDescription" platform="ios" target="*-Info.plist">
<string>To add photos</string>
</config-file>
<config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
<string>To add photos</string>
</config-file>
<config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
<string>To add photos</string>
</config-file>
<plugin name="cordova-plugin-ionic" spec="^5.2.7">
<variable name="APP_ID" value="cc4111" />
<variable name="CHANNEL_NAME" value="Master" />
<variable name="UPDATE_METHOD" value="background" />
<variable name="UPDATE_API" value="https://api.ionicjs.com" />
<variable name="MAX_STORE" value="2" />
<variable name="MIN_BACKGROUND_DURATION" value="30" />
</plugin>
<plugin name="cordova-plugin-file" spec="^6.0.1" />
<plugin name="cordova-plugin-file-transfer" spec="^1.7.1" />
<plugin name="cordova-plugin-network-information" spec="^2.0.1" />
<plugin name="cordova-sqlite-storage" spec="^2.5.0" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="phonegap-plugin-push" spec="2.2.0">
<variable name="FCM_VERSION" value="11.6.0" />
</plugin>
<plugin name="cordova-plugin-firebase" spec="2.0.5" />
<engine name="android" spec="7.0.0" />
<engine name="ios" spec="4.5.5" />
`
# Project target. target=android-26 android.library.reference.1=CordovaLib android.library.reference.2=app cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.37.0 cordova.gradle.include.1=cordova-plugin-firebase/healthcraft-build.gradle cordova.system.library.3=com.google.android.gms:play-services-tagmanager:+ cordova.system.library.4=com.google.firebase:firebase-core:+ cordova.system.library.5=com.google.firebase:firebase-messaging:+ cordova.system.library.6=com.google.firebase:firebase-config:+ cordova.system.library.7=com.google.firebase:firebase-perf:+ cordova.system.library.8=com.android.support:support-annotations:27.+ cordova.system.library.9=com.android.support:support-v13:26.+ cordova.system.library.10=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.11=com.google.firebase:firebase-messaging:11.+ cordova.gradle.include.2=phonegap-plugin-push/healthcraft-push.gradle
I have already tried the other post solution but it does not seems work on my project
cordova version : 8.0.0
i'll already tried all the phonegap-plugin-push, it always gives error when using version 2.0.0/2.1.0/2.1.2/2.2.3 , i want to update to FCM.
The error :
Where: Script 'C:\xampp\htdocs\x\platforms\android\phonegap-plugin-push\x-push.gradle' line: 38
What went wrong: A problem occurred evaluating root project 'android'.
This is my plugin : com.phonegap.plugins.fileopener 1.0.0 "File Opener" com.telerik.plugins.nativepagetransitions 0.6.2 "Native Page Transitions" com.verso.cordova.clipboard 0.1.0 "Clipboard" cordova-plugin-actionsheet 2.3.1 "ActionSheet" cordova-plugin-app-event 1.2.0 "Application Events" cordova-plugin-badge 0.8.7 "Badge" cordova-plugin-camera 2.4.0 "Camera" cordova-plugin-compat 1.1.0 "Compat" cordova-plugin-device 1.1.2 "Device" cordova-plugin-file 4.1.1 "File" cordova-plugin-file-opener2 2.0.2 "File Opener2" cordova-plugin-file-transfer 1.5.1 "File Transfer" cordova-plugin-hotline 1.2.1 "Hotline plugin for Phonegap" cordova-plugin-inappbrowser 1.7.0 "InAppBrowser" cordova-plugin-inapppurchase 1.1.0 "In App Purchase" cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification" cordova-plugin-media 2.2.0 "Media" cordova-plugin-screen-orientation 1.4.2 "Screen Orientation" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-statusbar 2.2.3 "StatusBar" cordova-plugin-themeablebrowser 0.2.17 "ThemeableBrowser" cordova-plugin-vibration 2.1.1 "Vibration" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-plugin-x-socialsharing 5.1.3 "SocialSharing" cordova-plugin-x-toast 2.5.2 "Toast" cordova-sqlite-storage 1.4.8 "Cordova sqlite storage plugin" ionic-plugin-keyboard 2.2.1 "Keyboard" phonegap-plugin-push 2.0.0 "PushPlugin" uk.co.workingedge.phonegap.plugin.launchnavigator 3.2.0 "Launch Navigator"
and this is my platform android@6.2.1 build.gradle : target=android-25 android.library.reference.1=CordovaLib cordova.system.library.1=com.android.support:support-v4:24.1.1+ cordova.gradle.include.1=cordova-plugin-hotline/devprod190-build.gradle cordova.system.library.2=com.android.support:support-v4:26.+ cordova.gradle.include.2=cordova-plugin-local-notification/devprod190-localnotification.gradle cordova.gradle.include.3=cordova-plugin-badge/devprod190-badge.gradle cordova.system.library.3=com.android.support:support-v13:25.1.0 cordova.system.library.4=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.5=com.google.firebase:firebase-messaging:11.0.1 cordova.gradle.include.4=phonegap-plugin-push/devprod190-push.gradle cordova.system.library.6=com.squareup.okhttp3:okhttp:3+