app.json5中配置版本号:
获取版本号:
bundleManager.getBundleInfoForSelf(bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION).then((bundleInfo) => {let versionName = bundleInfo.versionName; //应用版本号}).catch((error: BusinessError) => {console.error("get bundleInfo failed,error is " + error)})