问题描述
import imageSource from "tns-core-modules/image-source"; let x = imageSource.fromNativeSource(bmp);
我一直试图在 nativescript-vue 项目中使用 android.graphics 画布在图像上绘制,当我导入图像源时出现此错误。请我是 nativescript 的新手
解决方法
或者,如果您使用 NS7+,则必须使用 @nativescript/core 导入而不是 tns-core-modules。