Hi, We have been trying to integrate facebook4 plugin for login using facebook. But once we add plugin our build gets failed with Dex merge issue. Can any one help us out?
Problem appears in Android or IOS
In Android it is having issues.
Can u share the screen shot exactly what you are getting the Issue?
I am adding log from terminal
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app: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 51s
at ChildProcess.whenDone (/Users/udaygarud/plmlogix/ionic_projects/CromoCrush 3/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 Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:19297) 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:19297) [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.
- cordova clean android
- cordova build android
I have tried everything but its still not building. We have another dependency of barcode scanner, i think it is conflicting with that.
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support' && requested.name != 'multidex') {
details.useVersion "${rootProject.ext.supportLibVersion}"
}
}
}
please refer this link…
after adding suggested changes
-
Where:
Build file ‘/Users/udaygarud/plmlogix/ionic_projects/CromoCrush 3/platforms/android/app/build.gradle’ line: 309 -
What went wrong:
Could not resolve all files for configuration ‘:app:debugCompileClasspath’.
Could not resolve com.android.support:support-annotations:27.+.
Required by:
project :app
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:support-v4:24.1.1+.
Required by:
project :app
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:support-v4:27.+.
Required by:
project :app
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:support-annotations:27.0.2.
Required by:
project :app > com.facebook.android:facebook-android-sdk:4.40.0 > com.facebook.android:facebook-core:4.40.0
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:support-core-utils:27.0.2.
Required by:
project :app > com.facebook.android:facebook-android-sdk:4.40.0 > com.facebook.android:facebook-core:4.40.0
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:support-v4:27.0.2.
Required by:
project :app > com.facebook.android:facebook-android-sdk:4.40.0 > com.facebook.android:facebook-common:4.40.0
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:appcompat-v7:27.0.2.
Required by:
project :app > com.facebook.android:facebook-android-sdk:4.40.0 > com.facebook.android:facebook-common:4.40.0
project :app > com.facebook.android:facebook-android-sdk:4.40.0 > com.facebook.android:facebook-login:4.40.0
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:cardview-v7:27.0.2.
Required by:
project :app > com.facebook.android:facebook-android-sdk:4.40.0 > com.facebook.android:facebook-common:4.40.0
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:customtabs:27.0.2.
Required by:
project :app > com.facebook.android:facebook-android-sdk:4.40.0 > com.facebook.android:facebook-common:4.40.0
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:support-annotations:26.0.2.
Required by:
project :app > com.facebook.android:facebook-android-sdk:4.40.0 > com.facebook.android:facebook-marketing:4.40.0
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
Could not resolve com.android.support:support-v4:26.1.0.
Required by:
project :app > com.google.firebase:firebase-auth:16.2.1 > com.google.android.gms:play-services-basement:16.2.0
Cannot get property ‘supportLibVersion’ on extra properties extension as it does not exist
-
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 2s
at ChildProcess.whenDone (/Users/udaygarud/plmlogix/ionic_projects/CromoCrush 3/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 Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:19975) 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:19975) [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.
[20:29:43] lint finished in 8.20 s
I modified project level /gradle.build
allprojects {
repositories {
jcenter()
to:
allprojects {
repositories {
jcenter { url "http://jcenter.bintray.com/"}
in files:
platforms/android/build.gradle
after that run the commands
- cordova clean android
- cordova build android
If Solution does not work try this one also…
buildscript {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
}
Hi I followed these instructions https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/535 and it got resolved. Only last answer worked.
thank you for your help
Welcome… Finally got it worked.