【发布时间】:2019-08-24 21:28:24
【问题描述】:
将 Nativescript 升级到 6 后,android.support.v4 库丢失,我的项目无法编译并引发以下错误:
错误 TS2339:“typeof v4”类型上不存在属性“text”
和
错误 TS2339:“typeof v4”类型上不存在属性“widget”
这就是我正在做的:
android.support.v4.widget.TextViewCompat.setAutoSizeTextTypeWithDefaults((this.whatLabel.nativeElement as Label).android, android.support.v4.widget.TextViewCompat.AUTO_SIZE_TEXT_TYPE_UNIFORM);
android.support.v4.text.BidiFormatter.getInstance(new java.util.Locale("iw")).unicodeWrap(text, android.support.v4.text.TextDirectionHeuristicsCompat.RTL)
我的 reference.d.ts 文件包含这一行:
<reference path="../node_modules/tns-platform-declarations/android-22.d.ts" />
也试过了:
<reference path="../node_modules/tns-platform-declarations/android.d.ts" />
【问题讨论】:
标签: nativescript android-support-library nativescript-angular