m***@hotmail.com
m***@hotmail.com
  • 发布:2024-11-05 21:13
  • 更新:2024-11-06 17:12
  • 阅读:125

【报Bug】4.32打包Android,小米澎湃无法深色模式

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 10.0.22635.4440

HBuilderX类型: Alpha

HBuilderX版本号: 4.32

手机系统: Android

手机系统版本号: Android 14

手机厂商: 小米

手机机型: Redmi Note 14 Pro

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

两台手机(一台为Android14, HyperOS1,一台为Google原生Android15),分别安装相同安装包

预期结果:

两台设备在深色模式下均可使用深色模式

实际结果:

HyperOS设备依然是浅色模式,原生安卓为深色模式

bug描述:

同一个安装包,在原生安卓上支持深色模式,在小米澎湃中不支持深色模式

2024-11-05 21:13 负责人:DCloud_Android_ST 分享
已邀请:
DCloud_heavensoft

DCloud_heavensoft

这么说太笼统了。在有问题的手机上真机运行,打印uni.getSystemInfo,看osTheme是什么

  • m***@hotmail.com (作者)

    这是两台手机在深色模式下的输出结果:


    {  
    "SDKVersion": "",
    "appId": "__UNI__7CD93F0",
    "appLanguage": "zh-Hans",
    "appName": "heStudio Authenticator",
    "appVersion": "1.4.0",
    "appVersionCode": 1400,
    "appWgtVersion": "1.4.0-preview241105",
    "brand": "xiaomi",
    "browserName": "chrome",
    "browserVersion": "126.0.6478.71",
    "deviceBrand": "xiaomi",
    "deviceId": "98CECDBCD1D9F782A316E2FD45B3556F",
    "deviceModel": "24090RA29C",
    "deviceOrientation": "portrait",
    "devicePixelRatio": 3.25,
    "deviceType": "phone",
    "isUniAppX": false,
    "language": "zh-CN",
    "model": "24090RA29C",
    "oaid": "a09a25bdac86873d",
    "osAndroidAPILevel": 34,
    "osLanguage": "zh-CN",
    "osName": "android",
    "osTheme": "light",
    "osVersion": "14",
    "pixelRatio": 3.25,
    "platform": "android",
    "romName": "MIUI",
    "romVersion": "V816",
    "safeArea": {
    "left": 0,
    "right": 375,
    "top": 34,
    "bottom": 818,
    "width": 375,
    "height": 784
    },
    "safeAreaInsets": {
    "top": 34,
    "right": 0,
    "bottom": 0,
    "left": 0
    },
    "screenHeight": 818,
    "screenWidth": 375,
    "statusBarHeight": 34,
    "system": "Android 14",
    "theme": "light",
    "ua": "Mozilla/5.0 (Linux; Android 14; 24090RA29C Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.71 Mobile Safari/537.36 uni-app (Immersed/33.846153)",
    "uniCompileVersion": "4.32",
    "uniCompilerVersion": "4.32",
    "uniPlatform": "app",
    "uniRuntimeVersion": "4.32",
    "version": "1.9.9.82246",
    "windowBottom": 0,
    "windowHeight": 818,
    "windowTop": 0,
    "windowWidth": 375,
    "errMsg": "getSystemInfo:ok"
    }

    {  
    "SDKVersion": "",
    "appId": "__UNI__7CD93F0",
    "appLanguage": "zh-Hans",
    "appName": "heStudio Authenticator",
    "appVersion": "1.4.0",
    "appVersionCode": 1400,
    "appWgtVersion": "1.4.0-preview241105",
    "brand": "xiaomi",
    "browserName": "chrome",
    "browserVersion": "130.0.6723.60",
    "deviceBrand": "xiaomi",
    "deviceId": "0B4C98B6118EC1EA06D063FAF8CCDF31",
    "deviceModel": "Redmi Note 7 Pro",
    "deviceOrientation": "portrait",
    "devicePixelRatio": 2.75,
    "deviceType": "phone",
    "isUniAppX": false,
    "language": "zh-CN",
    "model": "Redmi Note 7 Pro",
    "oaid": "",
    "osAndroidAPILevel": 35,
    "osLanguage": "zh-CN",
    "osName": "android",
    "osTheme": "dark",
    "osVersion": "15",
    "pixelRatio": 2.75,
    "platform": "android",
    "romName": "MIUI",
    "romVersion": "V130",
    "safeArea": {
    "left": 0,
    "right": 393,
    "top": 29,
    "bottom": 851,
    "width": 393,
    "height": 822
    },
    "safeAreaInsets": {
    "top": 29,
    "right": 0,
    "bottom": 0,
    "left": 0
    },
    "screenHeight": 851,
    "screenWidth": 393,
    "statusBarHeight": 29,
    "system": "Android 15",
    "theme": "dark",
    "ua": "Mozilla/5.0 (Linux; Android 15; Redmi Note 7 Pro Build/AP3A.241005.015; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.60 Mobile Safari/537.36 uni-app (Immersed/29.09091)",
    "uniCompileVersion": "4.32",
    "uniCompilerVersion": "4.32",
    "uniPlatform": "app",
    "uniRuntimeVersion": "4.32",
    "version": "1.9.9.82246",
    "windowBottom": 0,
    "windowHeight": 851,
    "windowTop": 0,
    "windowWidth": 393,
    "errMsg": "getSystemInfo:ok"
    }

    2024-11-06 15:35

DCloud_Android_ST

DCloud_Android_ST

在小米提供的云测平台测试了一批设备 https://testit.miui.com/remote uni.getSystemInfo返回的信息都是对的。你可以在云测上测试下你的apk 主题是否正常,不排除你的设备系统出现了bug导致

要回复问题请先登录注册