0

I want to integrate this plugin : https://github.com/salesforce-marketingcloud/MC-Cordova-Plugin into an already existing app that run Cordova 5.4.1.

I can install the plugin but when I try to build the app (for android) I get this mistake :

* What went wrong:

A problem occurred configuring root project 'android'.

Could not resolve all dependencies for configuration ':_debugCompile'. Could not find com.android.support:support-v4:26.0.0. Searched in the following locations: https://repo1.maven.org/maven2/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom https://repo1.maven.org/maven2/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar http://salesforce-marketingcloud.github.io/JB4A-SDK-Android/repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom http://salesforce-marketingcloud.github.io/JB4A-SDK-Android/repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar file:/C:/tools/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom file:/C:/tools/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar file:/C:/tools/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom file:/C:/tools/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar Required by: :android:unspecified > com.salesforce.marketingcloud:marketingcloudsdk:5.2.0 Could not find com.android.support:support-annotations:26.0.0. Searched in the following locations: https://repo1.maven.org/maven2/com/android/support/support-annotations/26.0.0/support-annotations-26.0.0.pom file:/C:/tools/android-sdk-windows/extras/android/m2repository/com/android/support/support-annotations/26.0.0/support-annotations-26.0.0.pom file:/C:/tools/android-sdk-windows/extras/android/m2repository/com/android/support/support-annotations/26.0.0/support-annotations-26.0.0.jar file:/C:/tools/android-sdk-windows/extras/google/m2repository/com/android/support/support-annotations/26.0.0/support-annotations-26.0.0.pom file:/C:/tools/android-sdk-windows/extras/google/m2repository/com/android/support/support-annotations/26.0.0/support-annotations-26.0.0.jar Required by: :android:unspecified > com.salesforce.marketingcloud:marketingcloudsdk:5.2.0 Could not find com.android.support:support-v4:26.0.0. Searched in the following locations: https://repo1.maven.org/maven2/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom file:/C:/tools/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom file:/C:/tools/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar file:/C:/tools/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom file:/C:/tools/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar Required by: :android:unspecified > com.salesforce.marketingcloud:marketingcloudsdk:5.2.0 > com.google.android.gms:play-services-gcm:11.0.1 > com.google.android.gms:play-services-basement:11.0.1

I can make it work with a recent version of Cordova, but only after adding a line of code in the source code of the plugin itself.

As I understand, the app doesn't access the good repository and can't download the support library it needs.

Does anyone have already used this plugin ? Does it word with older version of cordova ?

2

To answer in short upgrade to the latest Cordova 7.x.x. but make sure you install the latest Android platform (Cordova Android 6.3.0) Reference here: https://cordova.apache.org/announcements/2017/09/27/android-release.html#disqus_thread

To further explain. Our Cordova platform is currently: https://github.com/salesforce-marketingcloud/MC-Cordova-Plugin

Version 1.0.1

Released Nov 29, 2017

Depends on the Marketing Cloud Mobile Push iOS SDK v4.9.x
Depends on the Marketing Cloud Mobile Push Android SDK v5.2.x

Android SDK v5.2.x supports Android Oreo. Ref: http://salesforce-marketingcloud.github.io/JB4A-SDK-Android/

...so we will need to grab Cordova's latest version that supports that. The older versions of Cordova for Android are supported in this cross reference chart here: https://cordova.apache.org/docs/en/latest/guide/platforms/android/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.