Android Question Manifest parsing error when connecting to Firebase

Darsiar

Member
When strictly following instructions:

1. The first step is to follow the Firebase integration tutorial:

an error occurs:

Code compilation. Error
Manifest script parsing error:
Error parsing google-services.json:
Manifest script parsing error:
Error parsing json file. Make sure the package name is correct.
 

AnandGupta

Expert
Licensed User
Longtime User
Here is the solution.
I too faced similar error once.

The "package_name": "b4a.example", in the .json file (say)

should match the package name in build configuration (ctrl+B ) of B4A, see image

Change in .json file and it will work.

Regards,

Anand
 

Attachments

  • 2020-06-01_184535.png
    5.4 KB · Views: 121
Upvote 0

Darsiar

Member
AnandGupta!
Thanks a lot, it helped!
But now another error has occurred - the object
Private fm As FirebaseMessaging
in the FCM_Show application is not initialized, and then the program crashes immediately after launch

Any thoughts?
------------------------
Sub Service_Create
fm.Initialize("fm") <---- not initialized
MyFCMToken=fm.Token
 
Upvote 0

Darsiar

Member
Dear Erel!
Sorry, but we still couldn’t understand why in the FCM_Show example, which we just renamed, an error occurred while initializing the firebase object on line 23.
More precisely, an error does not occur there. Just after initialization, the object is empty (not initialized).
We strictly requested your instructions:
1. Registered the project in firebase
2. Changed the name of the application from FCM_Show to our chat.proba
3. uploaded the google-services.json file to the application root folder, next to the B4a file
We did not change anything else in this example.

The example is copied WITHOUT ERRORS, installed on the device, an input line appears. But in the debugger we see how the firebase object after initialization is QUIET without initialization without errors.

Please indicate what we missed in your instructions?
Sorry, but the instructions do not have such a case for such a situation.

What do i need to understand there?
Thank.
 
Last edited:
Upvote 0

Darsiar

Member
The latest version of the project with a new json file.
Actually, this is your example without change. Change only the key and project name
 

Attachments

  • chat.proba.zip
    34.3 KB · Views: 124
Upvote 0

Darsiar

Member
Sub Service_Create
fm.Initialize("fm") <--------------- not initialize !!!!
MyFCMToken=fm.Token <-------- ERROR: fm not initialize
Log (MyFCMToken)
Subscribe
ImHere.Initialize("ImHere",10000)
ImHere.Enabled=True
ChatsMap.Initialize
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…