Publishing custom version of ODK Collect on Playstore

My question is similar to A new publish of ODK collect . I want to publish my custom version of ODK Collect for Android devices. I've cloned the ODK collect and have made some of custom changes required for my project. But changing package name urges me to change in google-service.json file too. And when I try to get the blank form from the app, it throws me an exception with a message.
Attempt to invoke interface method 'int android.database.Cursor.getCount()' on a null object reference.

I've been stucked with this for very long. Suggestion would be much appreciated for the necessary procedure or changes I need to make when I change the package name to publish my custom version of it on playstore.