Problem building with extensions in 1.2.165 - Resource cannot be null (SOLVED)

Hi,
When bundling android (165 version), the following error appears:
image

Which dependencies do you have in your project?

I use the following dependencies :
https://github.com/rgrams/rendercam/archive/v1.0.1.zip
https://github.com/subsoap/defsave/archive/master.zip
https://github.com/Melsoft-Games/defold-md5/archive/master.zip
https://github.com/defold/extension-firebase-analytics/archive/master.zip
https://github.com/Dragosha/defoldgamecenter/archive/master.zip
https://github.com/MaratGilyazov/def_taptic_engine/archive/master.zip
https://github.com/subsoap/vibrate/archive/master.zip
https://github.com/AGulev/DefAppsFlyer/archive/master.zip
https://github.com/britzl/defold-clipboard/archive/master.zip
https://github.com/defold/extension-facebook/archive/2.3.3.zip
https://github.com/dyukorev/extension-push/archive/master.zip
https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-base-16.1.0.zip
https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-measurement-16.4.0.zip
https://github.com/defold/android-base-extensions/releases/download/1.0.0/support-v4-27.0.2.zip
https://github.com/defold/android-base-extensions/releases/download/1.0.0/firebase-core-16.0.8.zip
https://github.com/defold/android-base-extensions/releases/download/1.0.0/firebase-messaging-17.3.4.zip
https://github.com/defold/android-base-extensions/releases/download/1.0.0/support-v7-27.0.2.zip
https://github.com/britzl/defold-input/archive/2.5.1.zip,https://github.com/defold/extension-iap/archive/1.2.1.zip
https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-games-17.0.0.zip
https://github.com/defold/extension-adinfo/archive/2.1.0.zip
https://github.com/defold/extension-gpgs/archive/1.1.0.zip

Wow, that is a long list! Some recommendations:

Never depend on the master branch. Always depend on a specific release:

NO: https://github.com/defold/extension-firebase-analytics/archive/master.zip
YES: https://github.com/defold/extension-firebase-analytics/archive/1.3.1.zip

If you depend on the master branch you will always use the latest version of a dependency. This could introduce subtle bugs or breaking changes into your game. If you depend on a specific version you will be in control over if and when to update to a new version.

Gradle and deprecated base extensions

These are no longer needed. Defold 1.2.165 introduced support for Gradle. Gradle will resolve transitive dependencies if the extension contains a build.gradle file. For instance in Firebase Analytics:

Facebook
I would recommend that you update to the latest Facebook extension as that version supports Gradle:

There may be other things to change as well, but please start with the above changes and report back here with the results.

5 Likes

Thank you very much, I will try!

1 Like

@alexandr.gil did you manage to build your project when you updated your dependencies?

Yes! This works great, thanks!

1 Like

I was just about to post a question here asking how to find specific versions of releases to achieve the above, but managed to find it myself. The answer is to navigate to the “Releases” portion of the github page. For example for DefSave: https://github.com/subsoap/defsave/releases

1 Like

Currently when I try to bundle my game I get the same error.
I use these dependencies :
https://github.com/rgrams/rendercam/archive/v1.0.1.zip
https://github.com/britzl/monarch/archive/3.1.0.zip
https://github.com/subsoap/defsave/archive/v1.2.1.zip
https://github.com/Lerg/extension-admob/archive/master.zip
https://github.com/defold/extension-gpgs/archive/1.0.0.zip

My defold version : 1.2.166

Any ideas on what could cause this error?

You want a version 1.1.0 or above. 1.1.0 added support for Gradle builds. And there has been several new versions since (adding leaderboards, achievements and events):

1 Like