I am able to run my ionic app using ionic cordova run android
fine, but then I add the following plugins:
cordova plugin add cordova-plugin-firebasex
npm install @ionic-native/firebase-x
Then I add the following to app.module.ts
:
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
providers: [
FirebaseX
]
Now when I run the app, it fails, & I get the following console output, can someone please tell me what I did wrong & what needs to change:
C:\Users\damie.gradle\caches\transforms-1\files-1.1\guava-26.0-android.jar\56894ff0d24741572c1b24be8e9453ef\jetified-guava-26.0-android.jar: D8: Type
sun.misc.Unsafe
was not found, it is required for default or static interface methods desugaring ofsun.misc.Unsafe com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator.getUnsafe()
C:\Users\damie.gradle\caches\transforms-1\files-1.1\guava-26.0-android.jar\56894ff0d24741572c1b24be8e9453ef\jetified-guava-26.0-android.jar: D8: Typesun.misc.Unsafe
was not found, it is required for default or static interface methods desugaring ofvoid com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper.<clinit>()
D8: Cannot fit requested classes in a single dex file (# methods: 119442 > 65536)
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at Attiva il multidex per le app con più di 64.000 metodi | Android Studio | Android Developers
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
option to get more log output. Run with --scan to get full insights.Get more help at https://help.gradle.org
BUILD FAILED in 2m 36s
40 actionable tasks: 13 executed, 27 up-to-date
C:\Users\damie\Documents\Ionic\my-mechanic\platforms\android\gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\damie\Documents\Ionic\my-mechanic\platforms\android\app\src\main\java\org\apache\cordova\file\AssetFilesystem.java uses
unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Cannot fit requested classes in a single dex file (# methods: 119442 > 65536)FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at Attiva il multidex per le app con più di 64.000 metodi | Android Studio | Android Developers