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

Status
Not open for further replies.

Lello1964

Well-Known Member
Licensed User
Longtime 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

Well-Known Member
Licensed User
Longtime 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)
 
Upvote 0

Lello1964

Well-Known Member
Licensed User
Longtime 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
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime 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.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime 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.
 
Upvote 0

Lello1964

Well-Known Member
Licensed User
Longtime User
I had to search and add manually other Firebase Lib to compile app after automatic selection, and then start problems
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
and this. i never saw this before. downloaded new android sdk + those missing firebase resources (manually)
 

Attachments

  • B4A.png
    57.7 KB · Views: 523
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime 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.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime 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?!

 
Upvote 0

Jorge M A

Well-Known Member
Licensed User
Longtime 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.
 
Upvote 0

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...
 
Upvote 0
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…