错误:android.view.InflateException 使用 nativescript 插件反馈

Posted

技术标签:

【中文标题】错误:android.view.InflateException 使用 nativescript 插件反馈【英文标题】:Error: android.view.InflateException using nativescript plugin-feedback 【发布时间】:2020-05-25 04:03:22 【问题描述】:

关于这个插件:https://github.com/EddyVerbruggen/nativescript-feedback

有人知道为什么这个错误只在android上吗?

ios 的工作就像一个魅力。

firebase.update(`/puzzle/$puzzleItem.idUser/$currentItemKey`, puzzleItem).then(
        (resultUpdate) => 
                this._ngZone.run(() => 
                // FEEDBACK ERROR ??!!!
                this.feedback.show(
                    message: "Easiest thing ever, right?"
                );

                this.refreshPuzzle(listIndexItemsClicked);
            );
    
);

JS: ERROR Error: Uncaught (in promise): Error: android.view.InflateException: Binary XML file line #10: Binary XML file line #10: Error inflating class <unknown>
JS: (file:///node_modules/nativescript-feedback/feedback.js:17:0)
JS:     at ZoneAwarePromise(file:///node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:902:0)
JS:     at show(file:///node_modules/nativescript-feedback/feedback.js:15:0)
JS:     at (file:///src/app/puzzle/puzzle.component.ts:384:50)
JS:     at push.../node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js.ZoneDelegate.invoke(file:///node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:388:0)
JS:     at onInvoke(file:///node_modules/@angular/core/fesm5/core.js:26256:0)
JS:     at push.../node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js.ZoneDelegate.invoke(file:///node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:387:0)
JS:     at push.../node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js.Zone.run(file:...

【问题讨论】:

发布您的package.json 的内容(有关版本不匹配和可能需要的版本更新,请参阅) 另外,检查何时可以触发firebase.update - 是否在此时呈现原生布局? 更新工作正常,firebase 数据库中的字段已正确更新。该错误仅由 android 上的反馈插件引发。 this.feedback.show( message: "最简单的事情,对吧?" );正如我在 IOS 上提到的,相同的代码就像一个魅力,不要抛出任何错误......请按照要求在 package.json 下方找到 看起来问题与从承诺中调用的插件有关 - 请参阅此线程 github.com/EddyVerbruggen/nativescript-feedback/issues/35 【参考方案1】:

package.json


  "nativescript": 
    "id": "org.nativescript.help2help",
    "tns-android": 
      "version": "6.3.1"
    ,
    "tns-ios": 
      "version": "6.3.0"
    
  ,
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "scripts": 
    "lint": "tslint \"src/**/*.ts\""
  ,
  "dependencies": 
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "@nativescript/theme": "~2.2.1",
    "@nstudio/nativescript-loading-indicator": "^3.0.1",
    "@nstudio/nativescript-pulltorefresh": "^1.1.1",
    "moment": "^2.24.0",
    "nativescript-angular": "~8.20.3",
    "nativescript-feedback": "^1.3.12",
    "nativescript-plugin-firebase": "^10.3.3",
    "nativescript-simple-libsodium": "^1.0.6",
    "nativescript-ui-sidedrawer": "~8.0.0",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.4.0",
    "tns-core-modules": "~6.3.0",
    "zone.js": "~0.9.1"
  ,
  "devDependencies": 
    "@angular/compiler-cli": "~8.2.0",
    "@ngtools/webpack": "^8.3.23",
    "codelyzer": "~4.5.0",
    "nativescript-dev-webpack": "~1.4.0",
    "node-sass": "^4.7.1",
    "tslint": "~5.19.0",
    "typescript": "~3.5.3"
  ,
  "gitHead": "...",
  "readme": "NativeScript Application"

【讨论】:

以上是关于错误:android.view.InflateException 使用 nativescript 插件反馈的主要内容,如果未能解决你的问题,请参考以下文章

Pig 安装错误:错误 pig.Main:错误 2998:未处理的内部错误

Informix 错误:发生了语法错误。错误代码:-201

我收到一个错误:“MetaMask - RPC 错误:错误:错误:[ethjs-rpc] rpc 错误与有效负载”

错误精灵错误跟踪器错误

网页打开显示错误500是啥意思

PHP错误处理