Nativescript xml模板没有刷新缓存问题

时间:2016-04-22 04:59:15

标签: android xml caching nativescript

所以我遇到了以下问题。

有时在更改XML模板并因某种原因(使用genymotion运行livesync)时出错,即使完全删除文件内容也不会在编译时重置文件。

我的package.json:

"nativescript": {
    "id": "org.nativescript.myapp",
    "tns-android": {
        "version": "1.7.1"
    }
},
"dependencies": {
    "nativescript-telerik-ui": "^1.0.1",
    "tns-core-modules": "1.7.1"
},
"devDependencies": {
    "nativescript-dev-typescript": "^0.3.0",
    "typescript": "^1.8.10"
}

示例:

file.xml

<Page
  xmlns="http://schemas.nativescript.org/tns.xsd"
  class="my-page">
      <WrapLayout horizontalAlignment="center">
          <Button text="NEW ACCOUNT" tap="onTapAction" visibility="{{ noAccounts ? 'visible' : 'collapsed' }}" />
      </WrapLayout>
</Page>

出于某种原因,在添加Button标签后,我出现了错误。 然后我试着:

  • 回滚
  • 删除所有缓存rm -Rf ./platforms/android/build/* && rm -Rf ./platforms/android/.gradle/ && tns prepare android && tns build android
  • 删除大多数文件夹并执行新的tns install
  • tns platform remove android&gt; tns platform add android
  • 等...

没有任何作用,我总是得到同样的错误:

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/pages/login/start.xml:54:7
 ���close tagname
File: "/data/data/org.nativescript.myapp/files/app/tns_modules/ui/builder/builder.js, line: 157, column: 16

StackTrace: 
    Frame: function:'', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/ui/builder/builder.js', line: 157, column: 17
    Frame: function:'', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/xml/xml.js', line: 176, column: 17
    Frame: function:'EasySAXParser.parse', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/js-libs/easysax/easysax.js', line: 605, column: 22
    Frame: function:'XmlParser.parse', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/xml/xml.js', line: 194, column: 22

0 个答案:

没有答案