1***@qq.com
1***@qq.com
  • 发布:2025-09-22 19:00
  • 更新:2025-09-22 19:26
  • 阅读:21

【报Bug】uni.chooseImage 获取相册app闪退

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: Alpha

HBuilderX版本号: 4.81

手机系统: Android

手机系统版本号: Android 10

手机厂商: vivo

手机机型: vivo S7e

页面类型: vue

vue版本: vue3

打包方式: 离线

项目创建方式: HBuilderX

示例代码:

<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">测试获取相册</text>
</view>
<button @click="getImage">获取相册</button>
</view>
</template>

<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {

    },  
    methods: {  
        getImage(){  
            uni.chooseImage({  
                count: 1, //默认9  
                sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有  
                sourceType: ['album'], //从相册选择  
                success: function (res) {  
                    console.log(JSON.stringify(res.tempFilePaths));  
                }  
            })  
        }  
    }  
}  

</script>

<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

.logo {  
    height: 200rpx;  
    width: 200rpx;  
    margin-top: 200rpx;  
    margin-left: auto;  
    margin-right: auto;  
    margin-bottom: 50rpx;  
}  

.text-area {  
    display: flex;  
    justify-content: center;  
}  

.title {  
    font-size: 36rpx;  
    color: #8f8f94;  
}  

</style>

操作步骤:

步骤:
新建项目=》默认模板
创建uni.chooseImage 获取相册

闪退

预期结果:

正常获取相册

实际结果:

闪退

bug描述:

uni.chooseImage 获取相册app闪退,自定义基座与云端打包会白屏过个几秒app崩溃退出,标准基座直接闪退

2025-09-22 19:00 负责人:无 分享
已邀请:
金满斗

金满斗 - 聚宝盆记账易,真的好用

我是模拟器上模拟没有任何反应,他们都说正常这也就怪了。哎

要回复问题请先登录注册