Skip to content

App crash if ActionBar inculdes an 'id' tag [Android] #1691

@manijak

Description

@manijak

I am currently testing my ios-focused app on the android platform. There are a lot of issues here that I wouldn't expect...

I have some views that have an 'id' tag on the ActionBar, I use it to fetch the ActionBar instance in js and set a dynamic title for the page. This works just fine on iOS but on Android it crashes the app. Error below.

<Page xmlns="http://schemas.nativescript.org/tns.xsd">
  <Page.actionBar>
    <ActionBar id="mainActionBar" title="MyApp" />
  </Page.actionBar>
  ...
</Page>
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.myapp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: 
Calling js method onCreate failed

Error: Building UI from XML. @file:///app/views/main-view.xml:3:5
 ���Cannot read property 'setTag' of undefined
File: "/data/data/org.nativescript.myapp/files/app/tns_modules/ui/builder/builder.js, line: 154, column: 20

StackTrace: 
    Frame: function:'', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/ui/builder/builder.js', line: 154, column: 21
    Frame: function:'', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/xml/xml.js', line: 147, column: 13
    Frame: function:'EasySAXParser.parse', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/js-libs/easysax/easysax.js', line: 733, column: 23
    Frame: function:'XmlParser.parse', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/xml/xml.js', line: 194, column: 22
    Frame: function:'XmlStringParser.par
  • CLI: 1.6.1
  • Cross-platform modules: 1.6.2
  • Runtime(s): ios 1.6.0, android 1.6.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions