Nativescript 使用扩展AppCompatDialog的Android库

Nativescript 使用扩展AppCompatDialog的Android库,nativescript,Nativescript,因此,我试图创建一个插件,它使用最新的NativeScript种子,使用PrettyDialog() 但是,我在编译时遇到以下错误: Error: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 使用以下代码并调用show()(TypeScript)可实现此操作: 我一直在研究这里的错误(纯Android): 但这些解决方案都

因此,我试图创建一个插件,它使用最新的NativeScript种子,使用PrettyDialog()

但是,我在编译时遇到以下错误:

Error: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
使用以下代码并调用
show()
(TypeScript)可实现此操作:

我一直在研究这里的错误(纯Android): 但这些解决方案都没有奏效


我想这是可能的,但我是一个新的插件构建者,我确信我需要了解一些怪癖。

如果你对PrettyDialog不是很挑剔的话,也有类似的插件


NativeScript从v5.x引入了对AppCompatActivity的支持,该版本似乎刚刚上线。如果升级到最新版本,您应该绕过此错误。

谢谢,我将尝试v5
export class PrettyAlert {
  show() {
    const alert = this.createAlert();
  }

  createAlert(width?: number) {
    return new libs.mjn.prettydialog.PrettyDialog(app.android.context);
  }
}