Android Question After latest SDK update today, app using Firebase wan't start

Status
Not open for further replies.

Lello1964

Active Member
Licensed User
I have updated today to latest SDK.
After update App using Firebase Maven cannot start also in debug mode and doesn't tell information or error via Debug.

Compiling in Release mode and trying to start App i have this error to my smarphone screen.

java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[class com.google.firebase.iid.FirebaseInstanceId]>{1, type=0, deps=[Dependency{anInterface=interface com.google.firebase.platforminfo.UserAgentPublisher, type=required, direct=true}, Dependency{anInterface=class com.google.firebase.FirebaseApp, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.heartbeatinfo.HeartBeatInfo, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.events.Subscriber, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.installations.FirebaseInstallationsApi, type=required, direct=true}]}: interface com.google.firebase.installations.FirebaseInstallationsApi
at android.app.ActivityThread.installProvider(ActivityThread.java:6537)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6025)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5931)
at android.app.ActivityThread.access$1200(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6810)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[class com.google.firebase.iid.FirebaseInstanceId]>{1, type=0, deps=[Dependency{anInterface=interface com.google.firebase.platforminfo.UserAgentPublisher, type=required, direct=true}, Dependency{anInterface=class com.google.firebase.FirebaseApp, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.heartbeatinfo.HeartBeatInfo, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.events.Subscriber, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.installations.FirebaseInstallationsApi, type=required, direct=true}]}: interface com.google.firebase.installations.FirebaseInstallationsApi
at com.google.firebase.components.ComponentRuntime.validateDependencies(com.google.firebase:firebase-components@@16.0.0:170)
at com.google.firebase.components.ComponentRuntime.processInstanceComponents(com.google.firebase:firebase-components@@16.0.0:89)
at com.google.firebase.components.ComponentRuntime.<init>(com.google.firebase:firebase-components@@16.0.0:73)
at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@19.3.0:418)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:300)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:268)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:253)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@19.3.0:51)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1927)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1902)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@19.3.0:45)
at android.app.ActivityThread.installProvider(ActivityThread.java:6532)
... 10 more
 

Lello1964

Active Member
Licensed User
Manifet :

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="28"/>
<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:theme, "@style/Theme.AppCompat")

SetApplicationAttribute(android:theme, "@style/MyAppTheme")
'SetApplicationAttribute(android:theme, "@style/Theme.AppCompat")
AddApplicationText(<meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.google.android.gms.vision.DEPENDENCIES"
            android:value="barcode" />)
            
AddApplicationText(<activity
            android:theme="@style/AppTheme.NoActionBar"
            android:name="com.edwardvanraak.materialbarcodescanner.MaterialBarcodeScannerActivity"
            android:label="@string/library_name" >
        </activity>)
        
CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
        <item name="colorPrimary">#FF2196F3</item>
        <item name="colorPrimaryDark">#007CF5</item>
        <item name="colorAccent">#FFFF3D00</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="windowActionModeOverlay">true</item>
    </style>
</resources>
)


AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.flash" android:required="false" />)
'AddPermission("android.permission.ACCESS_COARSE_LOCATION")
AddPermission("android.permission.INTERNET")
AddPermission("android.permission.ACCESS_FINE_LOCATION")
AddPermission("android.permission.WAKE_LOCK")
AddPermission("android.permission.DEVICE_POWER")
'AddPermission("android.permission.ACCESS_COARSE_UPDATES")
AddPermission("android.permission.READ_PHONE_STATE")
AddPermission("android.permission.VIBRATE")
AddPermission("android.permission.CAMERA")
AddPermission("android.permission.RECORD_AUDIO")
AddPermission("android.permission.FLASHLIGHT")
AddPermission("android.permission.READ_CONTACTS")
AddPermission("android.permission.WRITE_CONTACTS")

AddPermission("android.hardware.camera")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddApplicationText(<activity android:name="ice.zxing.CaptureActivity"
            android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:windowSoftInputMode="stateAlwaysHidden">
        </activity>)
        
' // BlueTooth intents
AddReceiverText(s2, <intent-filter>
    <action android:name="android.bluetooth.adapter.action.STATE_CHANGED"/>
    <action android:name="android.bluetooth.device.action.ACL_CONNECTED"/>
    <action android:name="android.bluetooth.device.action.ACL_DISCONNECTED"/>
    </intent-filter>)
    
AddPermission(android.permission.BLUETOOTH)
'
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
 

Lello1964

Active Member
Licensed User
Main part :

B4X:
    #AdditionalRes: ..\Resources
    #AdditionalRes: ..\Resource
    #AdditionalRes: ..\ResourceBarcode
    '#Extends: de.amberhome.materialdialogs.MaterialDialogsActivity
    #Extends: android.support.v7.app.AppCompatActivity
    
#Region  Activity Attributes
    #FullScreen: true
    #IncludeTitle: false
#End Region

#AdditionalJar: com.google.android.gms:play-services-base

#MultiDex: True
 

DonManfred

Expert
Licensed User
Problem start after today update sdk.
I tried a sdk update after your thread here too.

i tried to run an working app (in the past) with the new artifacts.
It crashes here too. I got another error than you.
I am investigating.
 

DonManfred

Expert
Licensed User
When i did open my project i got a missing artifact error from the IDE about firebase-installations.

Did you got the same and installed the artifact too like i did?

I installed these two


The missing artifact error gone after i installed them.
But when running the app i got an error here. Another error than yours though.
 

Lello1964

Active Member
Licensed User
I had to search and add manually other Firebase Lib to compile app after automatic selection, and then start problems
 

drgottjr

Well-Known Member
Licensed User
and this. i never saw this before. downloaded new android sdk + those missing firebase resources (manually)
 

Attachments

Erel

Administrator
Staff member
Licensed User
I've removed the Firebase components from the list of recommended items.

For now you should use the components that are included in the "additional resources": https://www.b4x.com/b4a.html
If you already downloaded the updated Firebase components then download the additional resources and copy extras\b4a_local and extras\b4a_remote from the additional resources to your SDK.
 

DonManfred

Expert
Licensed User
Not exactly a workaround. The latest versions of Firebase aren't even listed in the release notes: https://firebase.google.com/support/release-notes/android
It is possible that there are new requirements which will be soon documented.
maybe this is relevant?!

Firebase Corecom.google.firebase:firebase-core:17.2.2 No longer add the Android library com.google.firebase:firebase-core.
This SDK included the Firebase SDK for Google Analytics. Now, to use Analytics (or any of the Firebase products that require or recommend the use of Analytics), you need to explicitly add the Analytics dependency:
com.google.firebase:firebase-analytics:17.2.2
 

Jorge M A

Well-Known Member
Licensed User
It is better to wait a bit until Google clear things up
Sorry for the suggestion, but I think it's worth a Big Note on the headline of the forum, because some of us got here only after we had beaten everything.
Thank you.
 

cholo

Member
Licensed User
I have updated today to latest SDK.
I use FirebaseAuth (1.06) and I can't start in debug mode. I can in Release Mode.

I don't understand the problem...
 
Status
Not open for further replies.
Top