Android Question Possible conflict between Firebase Jars? Please help!!

Paolodc

Member
I've been using Firebase ML with other firebase services. But I've received an error when the jar "com.google.firebase:firebase-core" is used with the jar "com.google.android.gmslay-services-tasks". I've removed the first one and finally my app was opend. With both of them it wasn't so.
But now my app works untill I open the Firebase ML layout: don't open the device camera.
With one thread I had put the below code lines in the Manifest Editor. That works, but without the other firebase services.
I put these lines but they crush when I open the app.



This is my Manifest editor:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="31"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:largeHeap,"true")
CreateResourceFromFile(Macro, Themes.DarkTheme)'or LightTheme
'******************************************


'' ' ' ' FIREBASE RESOURCES
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)

'NOTIFICATION
AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <external-files-path name="name" path="shared" />
)
'Activities _
AddApplicationText(<activity android:name="b4a.example3.backendprocesses_service$backendprocesses_service_BR"/>)
'_________
'******************************************

'
'********* TAP STRIP ***********************
CreateResource(drawable, background_tab.xml,
<selector xmlns:android="http://schemas.android.com/apk/res/android"
   android:exitFadeDuration="@android:integer/config_shortAnimTime">
  <item android:state_pressed="true" android:drawable="@color/background_tab_pressed" />
  <item android:state_focused="true" android:drawable="@color/background_tab_pressed"/>
  <item android:drawable="@android:color/transparent"/>
</selector>)
CreateResource(values, colors.xml,
<resources>
  <color name="background_tab_pressed">#6633B5E5</color>
</resources>)

'PERMISSIONS
'AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
SetApplicationAttribute(android:requestLegacyExternalStorage, true)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
AddPermission(android.permission.RECORD_AUDIO)

'' ' ' ' ' FIREBASE ML
'' FIREBASE ML
'AddPermission(android.permission.CAMERA) ' Required to be able to access the camera device.
'AddPermission(android.permission.WRITE_EXTERNAL_STORAGE) ' Allows an application to write to external storage.
'' FIREBASE ML ----- THIS CLOSES THE APP ----- * * * ** * * * * ** * ----- THIS CLOSES THE APP ----- * * * ** * * * * ** * 
AddApplicationText(
 <service android:name="com.google.firebase.components.ComponentDiscoveryService" >
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.iid.Registrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
             <meta-data
                android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
             <meta-data
                android:name="com.google.firebase.components:com.google.firebase.storage.StorageRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
               android:name="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar"
               android:value="com.google.firebase.components.ComponentRegistrar"/>
           <meta-data
                    android:name="com.google.firebase.components:com.google.firebase.database.DatabaseRegistrar"
                    android:value="com.google.firebase.components.ComponentRegistrar"/>
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.ml.common.CommonComponentRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.ml.vision.VisionRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
</service>
)

These are the jars in Main activity.
JARS:
#AdditionalJar: com.google.android.gms:play-services-base
'#AdditionalJar: com.google.firebase:firebase-core
'#AdditionalJar: com.android.support:support-v4
'#AdditionalJar: com.google.firebase:firebase-database
#AdditionalJar: com.google.android.gms:play-services-tasks
#AdditionalJar: com.google.firebase:firebase-ml-vision
#AdditionalJar: com.google.firebase:firebase-ml-common
#AdditionalRes: ..\resources

These are the Firebase Libraries that I'm using:
- FirebaseAnalytics
- FirebaseAuth
- FirebaseAtuhEx2
- FirebaseML
- FirebaseNotification
- FirebaseStorage


Realy, HELP ME!
Thanks.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…