d***@foxmail.com
d***@foxmail.com
  • 发布:2023-06-21 19:38
  • 更新:2023-06-26 23:36
  • 阅读:340

【报Bug】uni.scanCode 在离线android打包下,无法使用直接黑屏

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.8.4

手机系统: Android

手机系统版本号: Android 12

手机厂商: 华为

手机机型: 三星小米华为都试过

页面类型: vue

vue版本: vue2

打包方式: 离线

项目创建方式: HBuilderX

操作步骤:

使用uni.scanCode 然后唤起页面黑屏

预期结果:

能够正常显示摄像头页面

实际结果:

黑屏

bug描述:

使用云端打包可以,离线打包并集成到自己的android环境里,会直接黑屏无法显示。

构建信息为。

错误信息中,似乎是TextureView 的问题?

TextureView not displayed because it is too large to fit into a software layer (or drawing cache), needs 11856544 bytes, only 10108800 available
plugins {  
    id 'com.android.application' version '8.0.2' apply false  
    id 'com.android.library' version '8.0.2' apply false  
    id 'org.jetbrains.kotlin.android' version '1.7.20' apply false  
}
android {  
    namespace 'com.example.yiwu_app'  

    compileSdkVersion 30  
    buildToolsVersion '30.0.3'  

    defaultConfig {  
        applicationId "********"  
        minSdkVersion 26  
        targetSdkVersion 28  

        multiDexEnabled true  

        versionCode 134  
        versionName "1.3.4"  

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"  
        vectorDrawables {  
            useSupportLibrary true  
        }  

        multiDexEnabled true  
        ndk {  
            abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'  
        }  
        compileOptions {  
            sourceCompatibility JavaVersion.VERSION_1_8  
            targetCompatibility JavaVersion.VERSION_1_8  
        }  
    }  

    compileOptions {  
        sourceCompatibility JavaVersion.VERSION_1_8  
        targetCompatibility JavaVersion.VERSION_1_8  
    }  
    kotlinOptions {  
        jvmTarget = '1.8'  
    }  
    buildFeatures {  
        //compose true  
        viewBinding true  
    }  
    composeOptions {  
        kotlinCompilerExtensionVersion '1.3.2'  
    }  
    packagingOptions {  
        resources {  
            excludes += '/META-INF/{AL2.0,LGPL2.1}'  
        }  
    }  
    //使用uniapp时,需复制下面代码  
    aaptOptions {  
        additionalParameters '--auto-add-overlay'  
        //noCompress 'foo', 'bar'  
        ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"  
    }  
.....  
}
2023-06-21 19:38 负责人:无 分享
已邀请:
FullStack

FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866

该问题目前已经被锁定, 无法添加新回复