I am getting an error while trying to use a custom/reusable xml template


Issue occured on:
-platform: Android
-CLI: tns 2.5.4
-Cross-platform modules: 2.5.0
-Runtime(s): “tns-android”: {“version”: “2.5.0”}

Description of Issue:
I am getting an error while trying to use a custom/reusable xml template, I have created a custom/reusable xml template at app/shared/views/customActionBar.xml:

    <ActionBar title="Sign up"></ActionBar>

then I tried to use it in app/views/login/login.xml as follows:

    <sharedViews:customActionBar />
    <StackLayout orientation="vertical">
        <Image src="res://logo" stretch="none" horizontalAlignment="center" />
        <TextField id="email" text="{{ email }}" hint="Email Address" keyboardType="email" autocorrect="false" autocapitalizationType="none" />
        <TextField secure="true" text="{{ password }}" hint="Password" />

        <Button text="Sign in" tap="signIn" />
        <Button text="Sign up for Groceries" class="link" tap="register" />

then I got the following error when I run tns run android:

An uncaught Exception occurred on “main” thread.
java.lang.RuntimeException: Unable to start
activity ComponentInfo{org.nativescript.Groceries/
Calling js method onCreate failed

Error: Building UI from XML.

Building UI from XML.
cannot read property ‘exports’ of undefined
File: "file:///data/data/org.nativescript.Groceries/files/app
/tns_modules/tns-core-modules/ui/builder/builder.js, line:
175, column: 20