Android Question FirebaseAnalytics.Firebase crashing app

Lucas Eduardo

Active Member
Licensed User
Hello, i reinstall the SDK Manager and when i debug an app it crashs before start. So i found what was causing the problem and it's this line in manifest editor
Code:
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
I searched for a lot solutions in forum but with not success, i already marked all firebase librarys. What could be?

That's the error in the unfiltered logs
B4X:
FATAL EXCEPTION: main
Process: iBrew.cervejaria, PID: 2017
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.heartbeatinfo.HeartBeatInfo, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.installations.FirebaseInstallationsApi, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.events.Subscriber, type=required, direct=true}, Dependency{anInterface=class com.google.firebase.FirebaseApp, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.platforminfo.UserAgentPublisher, type=required, direct=true}]}: interface com.google.firebase.installations.FirebaseInstallationsApi
    at android.app.ActivityThread.installProvider(ActivityThread.java:6407)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5909)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5826)
    at android.app.ActivityThread.-wrap1(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1708)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:176)
    at android.app.ActivityThread.main(ActivityThread.java:6662)
    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.heartbeatinfo.HeartBeatInfo, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.installations.FirebaseInstallationsApi, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.events.Subscriber, type=required, direct=true}, Dependency{anInterface=class com.google.firebase.FirebaseApp, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.platforminfo.UserAgentPublisher, 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:6395)
    ... 10 more
  Force finishing activity iBrew.cervejaria/.main
 

DonManfred

Expert
Licensed User
Longtime User
Hello, i reinstall the SDK Manager
Do it again. Folow the installation instructions (two files to download and to extract).
Do NOT install any additional firebase component.
Try again.
 
Upvote 0

Lucas Eduardo

Active Member
Licensed User
i getting this Maven artifact not found: com.android.support/support-v4

i already download it in SDK Manager

i'm using android.jar C:\Android\platforms\android-28\android.jar

the path to SDK is E:\Android\tools\bin\sdkmanager.bat

version B4A 9.8
 
Last edited:
Upvote 0

Lucas Eduardo

Active Member
Licensed User
Yes, i reinstall everything right now and without success

This error it's in just one project, i tryed in another one and works.
 

Attachments

  • 1.png
    1.png
    17.8 KB · Views: 364
  • 2.png
    2.png
    27 KB · Views: 359
Upvote 0

Lucas Eduardo

Active Member
Licensed User
After uncheck FirebaseNotifications i'm getting this error
B4X:
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Generating R file.    Error
AndroidManifest.xml:34: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').

But in other project this error did not occur, i can't understand why.
 
Last edited:
Upvote 0

Lucas Eduardo

Active Member
Licensed User
my manifest is
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" 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$")
CreateResourceFromFile(Macro, Themes.LightTheme)

'SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
'SetActivityAttribute(PrincipalCigana, android:windowSoftInputMode, adjustResize|stateHidden)
'SetActivityAttribute(PrincipalCervejaria, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(main, android:windowSoftInputMode, adjustPan|stateHidden)
SetActivityAttribute(PrincipalCigana, android:windowSoftInputMode, adjustPan|stateHidden)
SetActivityAttribute(PrincipalCervejaria, android:windowSoftInputMode, adjustPan|stateHidden)

'AddPermission(android.permission.READ_EXTERNAL_STORAGE)
'AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)

''''''''''''SELFIE'''''''''''''''''
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,
   <files-path name="name" path="shared" />
)
''''''''''''SELFIE'''''''''''''''''

CreateResourceFromFile(Macro, Core.NetworkClearText)

I don't know where is the problem.
 
Upvote 0

Lucas Eduardo

Active Member
Licensed User
This specific project it's working in another computer, but in other one gaves me this errors with the firebase and i don't know why, i did all the steps for installations.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
This specific project it's working in another computer, but in other one gaves me this errors with the firebase and i don't know why, i did all the steps for installations.
If you provide a AnyDesc ID i can help you seting up to problematic PC.

Start with downloading the two zips. I can connect to your pc at 5:30 PM (German time)
It is 1:45 PM now...
 
Upvote 0

Lucas Eduardo

Active Member
Licensed User
It's working now, i tryed one more time to update tha SDK and there was an item to update after update this item the app compiled. I don't know if that was the problem.
Thank you DonManfred and Erel for your time.
 

Attachments

  • sdk.png
    sdk.png
    19.9 KB · Views: 343
Upvote 0

prajinpraveen

Active Member
Licensed User
Longtime User
Hello there, i have the same issue. after three hours of troubleshooting, i figured the line causing the error is =>> CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase) in the manifest editor
My previous target sdk was 28 and i had my android.jar from version 28

The issue started when i updated the SDK this morning. The app doesnot provide any crash log, just dies.
have tried with target sdk 29 and android.jar from version 29

many thanks
 
Upvote 0

prajinpraveen

Active Member
Licensed User
Longtime User
I had to delete the SDK and reinstall it to solve the problem. I did a vanilla install.

I am not sure if I am missing any other components for my other apps. Will have to wait and see
 
Upvote 0
Top