1***@qq.com
1***@qq.com
  • 发布:2019-04-28 17:16
  • 更新:2019-04-29 15:28
  • 阅读:2535

【已解决】本地打包,uni-app中previewImage 预览图片app闪退

分类:uni-app

详细问题描述

(DCloud产品不会有明显的bug,所以你遇到的问题大都是在特定环境下才能重现的问题,请仔细描述你的环境和重现方式,否则DCloud很难排查解决你的问题)

[内容]
真机测试的时候正常,本地打包后出现闪退的问题,目前测试的的手机oppo,vivo,华为

<block v-for="(image,index) in imageList" :key="index">  
 <view class="uni-uploader__file" style="position: relative;">  
<image class="uni-uploader__img" :src="image" @tap="previewImage(index)"></image>  
<view class="close-view" @click="close(index)">x</view>  
</view>  
</block>
previewImage(index) { //预览图片  
 uni.previewImage({  
  urls: this.imageList,  
   current:this.imageList[index]  
  });  
 }

此问题已经解决
android studio 打包运行报错:java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bumptech/glide/Glide;
发现新下载的sdk,app下的build.gradle中有:implementation 'com.github.bumptech.glide:glide:4.9.0'
添加后正常.
下面是官方sdk中dependencies 节点的配置
dependencies {
implementation fileTree(dir: 'libs', include: ['.jar'])
implementation fileTree(dir: 'libs', include: ['
.aar'])

implementation "com.android.support:recyclerview-v7:25.3.1"  
implementation "com.android.support:support-v4:25.3.1"  
implementation "com.android.support:appcompat-v7:25.3.1"  

implementation 'com.alibaba.android:bindingx-core:1.0.3'  
implementation 'com.alibaba.android:bindingx_weex_plugin:1.0.3'  
implementation 'com.squareup.okhttp:okhttp:2.3.0'  
implementation 'com.squareup.okhttp:okhttp-ws:2.3.0'  
implementation 'com.alibaba:fastjson:1.1.46.android'  
implementation 'com.facebook.fresco:fresco:0.12.0'  
// 基座需要,必须添加  
implementation 'com.github.bumptech.glide:glide:4.9.0'  

// 添加uni-app插件  
implementation project(':uniplugin_richalert')  

}
希望能详细解释下里面的配置都有什么用,我只用到了v7包,glide,以及lib.5plus.base-release.aar
其他的没添加,也不知道什么意思,有什么用,目前没有报错

2019-04-28 17:16 负责人:无 分享
已邀请:
DCloud_App_Array

DCloud_App_Array

请提供Android设备的详细信息,复现问题的apk。

  • 1***@qq.com (作者)

    问题已经解决

    2019-04-29 15:52

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