gurisko / cordova-plugin-accountkit

AccountKit Plugin for Apache Cordova which allows you to add passwordless email and SMS authentication to your app
MIT License
34 stars 43 forks source link

conflict with phonegap-plugin-push #49

Open phongVuabanhmi opened 6 years ago

phongVuabanhmi commented 6 years ago

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

please help me!

sdeemene commented 6 years ago

(Ionic 3) Ensure the phonegap push is working before taking these steps below Step 1: cordova plugin accountkit i**onic 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 commented 5 years ago

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

Kaoschuks commented 5 years ago

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