You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

NativeScript-Vue安卓项目使用RadListView时遇Webpack错误求助

Solution for RadListView Webpack Error in NativeScript 6.8.0

The error you're seeing (TypeError: _nativescript_core__WEBPACK_IMPORTED_MODULE_0__.Property is not a constructor) is caused by a version compatibility mismatch between NativeScript 6.8.0 and the nativescript-ui-listview@9.0.4 plugin.

Here's the root cause:

  • Version 9.x of nativescript-ui-listview is built exclusively for NativeScript 7.0 and above, which introduced breaking changes to core APIs like the Property class.
  • NativeScript 6.8.0 uses an older implementation of Property that doesn't align with the 9.x plugin's code structure, triggering the constructor error you're seeing.

Step-by-Step Fix:

  1. Uninstall the incompatible plugin version
    Run this command in your project root:

    npm uninstall nativescript-ui-listview
    
  2. Install a RadListView version compatible with NativeScript 6.8.0
    The latest stable release that works with NS 6.x is 8.2.1. Install it with:

    npm install nativescript-ui-listview@8.2.1 --save
    
  3. Clean your project to clear cached conflicts

    • For macOS/Linux:
      rm -rf node_modules platforms hooks package-lock.json
      
    • For Windows:
      rmdir /s/q node_modules platforms hooks && del package-lock.json
      
  4. Reinstall dependencies and rebuild your project

    npm install
    tns run android
    

Additional Notes:

  • If you plan to upgrade your project to NativeScript 7+ later, you can safely switch back to nativescript-ui-listview@9.x once the core upgrade is complete.
  • Always verify plugin version compatibility with your NativeScript core version before installing—older NS releases require corresponding older plugin builds to avoid API mismatches.

内容的提问来源于stack exchange,提问作者Mike Smedley

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 19:42:55