我想在我的应用程序中显示 Android 版本(如 8.0、9.0...)。现在我正在使用:Platform.Version
但这会返回 API 版本 (24, 25 ...)。
我想要一个比仅仅创建映射更优雅的选项,并且不需要在每次有新的 android 版本时重新发布。有没有办法在没有外部库的情况下做到这一点?
你可以 :
import { Platform } from 'react-native';
const OsVer = Platform.constants['Release'];
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句