Skip to content

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

Closed

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

Activity

  1. added a commit that references this issue on Mar 3, 2016
    66936ff
  2. added this to the 1.7.0 milestone on Mar 7, 2016
  3. lock commented on Aug 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  4. locked and limited conversation to collaborators on Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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