I'm trying to include Firebase to use the push notification feature.
When I add the FirebaseNotifications library to B4A IDE and compile, the following error appears:
I researched the problem and found it to be caused by duplicate classes. I also discovered that the other library that is in conflict is the SQLCipher. By referencing this library together with the FirebaseNotification library you can simulate the error.
I tried opening .jar file with 7zip to delete the duplicate class but I did not find it and the .class file appears scrambled in the text editor.
How do I solve this? I need the 2 libraries in my application. Is it possible to resolve using #ExcludeClasses?
When I add the FirebaseNotifications library to B4A IDE and compile, the following error appears:
B4A version: 6.80
Parsing code. (0.00s)
Compiling code. (0.11s)
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. (1.17s)
Compiling generated Java code. (1.66s)
Convert byte code - optimized dex. Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/google/common/base/FinalizableReference;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:615)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:570)
at com.android.dx.command.dexer.Main.access$2(Main.java:546)
at com.android.dx.command.dexer.Main$2.processFileBytes(Main.java:514)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:537)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
at com.android.dx.command.dexer.Main.run(Main.java:206)
at com.android.dx.command.dexer.Main.main(Main.java:179)
at com.android.dx.command.Main.main(Main.java:103)
1 error; aborting
I researched the problem and found it to be caused by duplicate classes. I also discovered that the other library that is in conflict is the SQLCipher. By referencing this library together with the FirebaseNotification library you can simulate the error.
I tried opening .jar file with 7zip to delete the duplicate class but I did not find it and the .class file appears scrambled in the text editor.
How do I solve this? I need the 2 libraries in my application. Is it possible to resolve using #ExcludeClasses?
Last edited: