Android Question Firebase Analytics problem

tufanv

Expert
Licensed User
Longtime User
Hello,

I added the manifest of google play base , firebase base and analytics and followed the firebase analytics tutorial. I get this message after i edit the services and tried to run the app

B4X:
B4A version: 6.00 BETA #1
Parsing code.    (0.07s)
Compiling code.    (0.21s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.03s)
Generating R file.    Error
g:\android\android-sdk\extras\google\google-play-services\libproject\google-play-services_lib\res\values\base_attrs.xml:11: error: Attribute "buttonSize" has already been defined
g:\android\android-sdk\extras\google\google-play-services\libproject\google-play-services_lib\res\values\base_attrs.xml:16: error: Attribute "colorScheme" has already been defined
g:\android\android-sdk\extras\google\google-play-services\libproject\google-play-services_lib\res\values\base_attrs.xml:21: error: Attribute "scopeUris" has already been defined
g:\android\android-sdk\extras\google\google-play-services\libproject\google-play-services_lib\res\values\common_attrs.xml:13: error: Attribute "imageAspectRatioAdjust" has already been defined
g:\android\android-sdk\extras\google\google-play-services\libproject\google-play-services_lib\res\values\common_attrs.xml:22: error: Attribute "imageAspectRatio" has already been defined
g:\android\android-sdk\extras\google\google-play-services\libproject\google-play-services_lib\res\values\common_attrs.xml:27: error: Attribute "circleCrop" has already been defined
 

tufanv

Expert
Licensed User
Longtime User
The solution is to remove the #AdditionalRes line that added all google play services resources.
deleted the line and now getting :

I think i got all the errors i can get while trying to set up firebase

B4X:
B4A version: 6.00 BETA #1
Parsing code.    (0.09s)
Compiling code.    (0.18s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.01s)
Generating R file.    (0.13s)
Compiling generated Java code.    (2.61s)
Convert byte code - optimized dex.    Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/api/Api$zza;
    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
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
I deleted the other admob interstitial library and error is gone. I will change it with firemob.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
These errors are related to the transition from the old way to reference google services and the new way (which is lighter).

Note that I wasn't able to reproduce it here with the project you've sent me. The reference to the "old" google play services should be removed automatically when the new one is used. Not sure why it didn't happen.
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
As I said, I deleted the mwadinterstaitial library from the project and it is fixed =) I will change it to firebase ads
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…