How to use the native android widgets type definitions in nativescript?

后端 未结 1 1792
傲寒
傲寒 2021-01-24 19:39

I installed the platform definitions by adding \"tns-platform-declarations\": \"^2.5.2\"However, when I use the definitions in tns-platform-declarations/andro

1条回答
  •  一向
    一向 (楼主)
    2021-01-24 19:58

    There's an experimental type definitions generating tool for the android sdk, and android support libraries used in the project. Do a build/run with the --androidTypings flag to have d.ts' generated for you.

    Those should contain the classes that you can't find in the platform-declarations, as they are generated against the versions used in your project.

    tns build android --androidTypings

    0 讨论(0)
提交回复
热议问题