Application didn't start on android device when i add facebook plugin

Hello ,
I try to use facebook authentification on my ionic application ,
I tested it on emulator it worked , but when i try on android device the application didn’t start
After ionic cordova run android
i get just a black screen , when i romve facebook plugin from my application , it start correctly

On ios my application started correctly with the facebook plugin .
android version : 6.4.0
my application info
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0

local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 6.4.0
Ionic Framework : ionic-angular 3.9.2

System:
Android SDK Tools : 26.1.1
Node : v8.11.3
npm : 5.6.0
OS : Windows 10

$ ionic cordova plugin -ls
cordova-google-api-version 0.0.1 “cordova-google-api-version”
cordova-plugin-admobpro 2.31.6 “AdMob Plugin Pro”
cordova-plugin-advanced-http 1.11.1 “Advanced HTTP plugin”
cordova-plugin-camera 4.0.3 “Camera”
cordova-plugin-device 1.1.7 “Device”
cordova-plugin-dialogs 1.3.4 “Notification”
cordova-plugin-extension 1.5.4 “Cordova Plugin Extension”
cordova-plugin-facebook4 2.3.0 “Facebook Connect”
cordova-plugin-file 6.0.1 “File”
cordova-plugin-globalization 1.11.0 “Globalization”
cordova-plugin-googleplus 5.3.0 “Google SignIn”
cordova-plugin-inappbrowser 1.7.2 “InAppBrowser”
cordova-plugin-media 5.0.2 “Media”
cordova-plugin-media-capture 3.0.2 “Capture”
cordova-plugin-nativeaudio 3.0.9 “Cordova Native Audio”
cordova-plugin-splashscreen 4.1.0 “Splashscreen”
cordova-plugin-statusbar 2.4.2 “StatusBar”
cordova-plugin-vibration 2.1.6 “Vibration”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-plugin-x-toast 2.7.0 “Toast”
ionic-plugin-keyboard 2.2.1 “Keyboard”

1 Like

I have the same problem :frowning:

Same here. Using version 2.4.0. Will you open a ticket here? https://github.com/jeduan/cordova-plugin-facebook4

I found this https://stackoverflow.com/a/52163457/2797208 It was the solution for me

I tried with 2.4.0 , i get the same error balck screen and noyhing happened
I tried the solution of @Volli i got this error

  • What went wrong:
    Execution failed for task ‘:transformDexArchiveWithExternalLibsDexMergerForDebug’.

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 14s
at ChildProcess.whenDone (D:\myproject\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:4124) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4124) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@mk1983 for that problem I installed cordova-plugin-enable-multidex

thank you @Volli i resolved that by using your solution and removing the android platform and add it again
$ ionic corova platform rm android
$ ionic corova platform add android@6.4.0

@mk1983 When you update to android@7.x.x, remember cordova-plugin-enable-multidex :smiley:

Hi i am facing same issue as above and i have tried all solution provided in comments. Still i am getting same error. I have tried with ```
facebook-android-sdk:4.34.0/4.35.0/4.36.0
My Configuration are:
node : v9.2.1
npm : v6.2.0
ionic : 3.9.2
cordova : 8.0.0
android: 7.0.0 and i have also installed cordova-plugin-enable-multidex.

Please help me out here as i am new to ionic development