联迪a8s android10 uni-app云打包 本地打包 在运行中发现白屏 其余机子可以显示 tabbar有显示 但页面一片空白无样式无生命周期

联迪a8s android10 uni-app云打包 本地打包 在运行中发现白屏 其余机子可以显示 tabbar有显示 但页面一片空白无样式无生命周期

开发环境 版本号 项目创建方式
Windows win10 HBuilderX

产品分类:uniapp/App

PC开发环境操作系统:Windows

HBuilderX类型:正式

HBuilderX版本号:4.45

手机系统:Android

手机系统版本号:Android 10

手机厂商:华为

手机机型:联迪A8s

页面类型:vue

vue版本:vue3

打包方式:云端

项目创建方式:HBuilderX

示例代码:

```json
{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "pages/login/login",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/order/order",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
}
},
{
"path": "pages/center/center",
"style": {
"navigationBarBackgroundColor": "#338F6C",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "我的",
"enablePullDownRefresh": true
}
}  
],

"tabBar": {  
    "color": "#BDBDBD",  
    "selectedColor": "#338F6C",  
    "borderStyle": "black",  
    "backgroundColor": "#ffffff",  
    "list": [  
        {  
            "pagePath": "pages/index/index",  
            "text": "首页"  
        },  
        {  
            "pagePath": "pages/order/order",  
            "text": "订单"  
        },  
        {  
            "pagePath": "pages/center/center",  
            "text": "我的"  
        }  
    ]  
},  
"globalStyle": {  
    "navigationBarTextStyle": "black",  
    "navigationBarTitleText": "油站端",  
    "navigationBarBackgroundColor": "#FFFFFF",  
    "backgroundColor": "#F8F8F8"  
}  
}

操作步骤:

  • 打开应用

预期结果:

  • 正常显示页面

实际结果:

  • 白屏 有tabbar显示tabbar但没页面,无tabbar就一白屏

bug描述:

云打包 运行白屏 页面无法加载I WebViewFactory: Loading com.android.webview version 74.0.3729.186 (code 373018605)
M007EC9  01-13 14:59:03.268  2837  2837 I com.i9tech.elm: The ClassLoaderContext is a special shared library.
M007ECA  01-13 14:59:03.293  2837  2837 I WebViewFactory: SystemProperties GMSVERSION =
M007ECB  01-13 14:59:03.293  2837  2837 I WebViewFactory: Get WebViewChromiumFactoryProvider
M007ECC  01-13 14:59:03.295  2446  2478 D JNI_DEBUG: EA_ucReadRS232Ms | iRet: 0, handle: 33, retLen: 0
M007ECD  01-13 14:59:03.304  2837  2837 I cr_LibraryLoader: Time to load native libraries: 3 ms (timestamps 9626-9629)
M007ECE  01-13 14:59:03.314  2837  2837 I chromium: [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0
M007ECF  01-13 14:59:03.314  2837  2837 I cr_LibraryLoader: Expected native library version number "74.0.3729.186", actual native library version number "74.0.3729.186"
M007ED0  01-13 14:59:03.317   611  1413 D GNSSMGT : watchdog: PowerState[UNKOWN STATE], gps_flag[0], readcount[0], idle time = 0, HeartCount = 0
M007ED1  01-13 14:59:03.318  2837  2837 D download_manager: BaseActivity onCreate
M007ED2  01-13 14:59:03.318  2837  2837 D         : onRuntimePreCreate appid=Main_App
M007ED4  01-13 14:59:03.330  2837  2837 I splash  : WebAppActivity.onCreateSplash().appid=null this.appid=Main_App this=io.dcloud.PandoraEntryActivity[@e17069b](/user/e17069b)
M007ED5  01-13 14:59:03.330  2837  2837 I splash  : WebAppActivity.onCreateSplash().mSplashView is Null =true
M007ED6  01-13 14:59:03.330  2837  2837 I WebAppActivity: onCreateSplash;intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.i9tech.elm/io.dcloud.PandoraEntryActivity bnds=[193,172][360,415] (has extras) }
M007ED7  01-13 14:59:03.330  2837  2837 I WebAppActivity: onCreateSplash hasSplash=true
M007ED8  01-13 14:59:03.331  2837  2837 I WebAppActivity: onCreateSplash __splash_mode__=auto
M007ED9  01-13 14:59:03.336  2837  2837 E com.i9tech.elm: Invalid ID 0x00000000.
M007EDA  01-13 14:59:03.336  2837  2837 D Main_Path: use defaultSplash
M007EDB  01-13 14:59:03.356  2837  2837 I platform: ClassNotFoundException io.dcloud.appstream.actionbar.StreamAppActionBarUtil checkNeedTitleView
M007EDC  01-13 14:59:03.356  2446  2478 D JNI_DEBUG: EA_ucReadRS232Ms | iRet: 0, handle: 33, retLen: 0
M007EDD  01-13 14:59:03.359  2837  2837 D WebAppActivity: checkAutoHide false
M007EE0  01-13 14:59:03.364  2837  2837 I         : onResume appid=Main_App
M007EE1  01-13 14:59:03.364  2837  2837 E Html5Plus-onResume: 1736751543364
M007EE4  01-13 14:59:03.372   414   414 D Zygote  : Forked child process 2903

更多关于联迪a8s android10 uni-app云打包 本地打包 在运行中发现白屏 其余机子可以显示 tabbar有显示 但页面一片空白无样式无生命周期的实战教程也可以访问 https://www.itying.com/category-93-b0.html

4 回复

请尝试使用云端打包看是否可以正常运行。如果云端打包正常则确定是否本地打包原生工程配置不正确导致的。

更多关于联迪a8s android10 uni-app云打包 本地打包 在运行中发现白屏 其余机子可以显示 tabbar有显示 但页面一片空白无样式无生命周期的实战教程也可以访问 https://www.itying.com/category-93-b0.html


云打包和本地打包都试过了,在联迪的a8s中页面直接错误,表现出来的就是白屏,页面就一个文本,其余型号机子可以,或者A8s本身刷调试模式也是正常工作

回复 3***@qq.com: 联迪的a8s是什么设备?系统有没有带默认的webview?uni-app项目中vue页面是依赖系统webview渲染的,如果没有系统webview则无法渲染。 如果系统不带webview,建议使用uni-app x。

根据日志分析,联迪A8s Android10设备上出现白屏问题可能是WebView兼容性问题导致的。以下是关键点分析:

  1. 日志显示WebView版本为74.0.3729.186,这个较旧的WebView版本可能存在兼容性问题

  2. 典型解决方案:

  • 尝试在manifest.json中添加"kernel"配置强制使用X5内核:
"kernel" : {
    "android": "x5"
}
回到顶部