Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

conflict with phonegap-plugin-push #49

Open
phongVuabanhmi opened this issue Jun 15, 2018 · 3 comments
Open

conflict with phonegap-plugin-push #49

phongVuabanhmi opened this issue Jun 15, 2018 · 3 comments

Comments

@phongVuabanhmi
Copy link

This plugin conflict with phonegap-plugin-push so when build, the error "Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.

please help me!

@sdeemene
Copy link

sdeemene commented Jul 16, 2018

(Ionic 3) Ensure the phonegap push is working before taking these steps below
Step 1: cordova plugin accountkit
ionic cordova plugin add cordova-plugin-accountkit --save    --variable APP_ID="244950*******”    --variable APP_NAME=“TsEt”   
--variable CLIENT_TOKEN="d137d62565d6F7jehejehejehj”    --variable API_VERSION="v1.2.2"**

Step 2. Change to.
<framework src="com.facebook.android:account-kit-sdk:4.22.0"/>
In plugin/cordova plugin accountkit/plugin.xml

Step 3. Change to
cordova.system.library.4=com.facebook.android:account-kit-sdk:4.22.0
In android/project.properties

Step 4. Add
configurations.all {
resolutionStrategy.eachDependency {
DependencyResolveDetails details -> def
requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.0'
}
}
}
}

To android/build.gradle

Step 4. Add to
**android{
defaultConfig {
multiDexEnabled true
versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode"))
applicationId privateHelpers.extractStringFromManifest("package")

    if (cdvMinSdkVersion != null) {
        minSdkVersion cdvMinSdkVersion
    }
}

.
.
.**
android/app/build.gradle

Step 5. Change to
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
implementation(project(path: ":CordovaLib"))
compile "com.android.support:support-v13:26.+"
compile "me.leolin:ShortcutBadger:1.1.17@aar"
compile "com.google.firebase:firebase-messaging:17.1.0"
compile "com.facebook.android:account-kit-sdk:4.22.0"

// SUB-PROJECT DEPENDENCIES END
}
android/app/build.gradle

Step 6. Change to
dependencies {
classpath 'com.android.tools.build:gradle:+'
classpath 'com.google.gms:google-services:+'
}
In android/phonegap-plugin-push ==>> starter-push.gradle

Step 7. delete or remove build folder from android/app

Step 8.
cordova clean android
ionic cordova prepare android
ionic cordova compile android
ionic cordova build android

@yassinzaid
Copy link

@De-Saint Thanks a lot , one month trying to fix it and i couldn't ... :) it works in cordova-plugin-fcm also :)

@Kaoschuks
Copy link

I have this issues and the above method does wonders to its.
Thanks a lot

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

No branches or pull requests

4 participants