uni.chooseImage
- 发布:2021-08-31 16:44
- 更新:2021-09-01 14:20
- 阅读:632
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Windows 10 专业版
HBuilderX类型: 正式
HBuilderX版本号: 3.2.3
手机系统: Android
手机系统版本号: Android 7.0
手机厂商: 华为
手机机型: 华为平板 C3 BZA-L00
页面类型: vue
打包方式: 云端
项目创建方式: HBuilderX
操作步骤:
预期结果:
uni.chooseImage后获取到选择的图片
uni.chooseImage后获取到选择的图片
实际结果:
报错
报错
bug描述:
选择图片然后进行上传,选择图片后报错,同样的代码在另外一台pad上正常(android 9)报如下错误:
I/art: Do partial code cache collection, code=98KB, data=126KB
After code cache collection, code=95KB, data=124KB
Increasing code cache capacity to 512KB
I/HwPointEventFilter: do not support AFT because of no config
W/System.err: java.io.FileNotFoundException: /storage/emulated/0/Android/data/xyz.dlhc.dleval.android/apps/UNIAEFA00B/doc (Is a directory)
W/System.err: at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at io.dcloud.common.util.FileUtil.getFileInputStream(SourceFile:13)
at io.dcloud.common.adapter.util.PlatformUtil.getInputStream(SourceFile:11)
at io.dcloud.common.adapter.util.PlatformUtil.getInputStream(SourceFile:21)
at io.dcloud.f.a.e.convert2LocalFullPath(SourceFile:7)
at io.dcloud.js.gallery.GalleryFeatureImpl.a(SourceFile:108)
at io.dcloud.js.gallery.GalleryFeatureImpl.a(SourceFile:1)
at io.dcloud.js.gallery.GalleryFeatureImpl$a.onGranted(SourceFile:15)
at io.dcloud.common.adapter.util.PermissionUtil$2.onGranted(SourceFile:1)
at io.dcloud.common.adapter.util.PermissionUtil.useSystemPermission(SourceFile:15)
at io.dcloud.common.adapter.util.PermissionUtil.usePermission(SourceFile:17)
at io.dcloud.js.gallery.GalleryFeatureImpl.execute(SourceFile:3)
at io.dcloud.h.b.a(SourceFile:140)
at io.dcloud.h.b.b(SourceFile:3)
W/System.err: at io.dcloud.h.b.processEvent(SourceFile:174)
at io.dcloud.f.b.c.dispatchEvent(SourceFile:22)
at io.dcloud.common.core.ui.l.processEvent(SourceFile:2)
at io.dcloud.common.adapter.ui.AdaUniWebView.exec(SourceFile:7)
at io.dcloud.common.adapter.ui.AdaUniWebView$1.execute(SourceFile:5)
at io.dcloud.common.adapter.util.MessageHandler$1.handleMessage(SourceFile:3)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6617)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
I/SendBroadcastPermission: action:wx_global_action, mPermissionType:0
I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
at int android.support.v4.view.ViewCompat.getImportantForAutofill(android.view.View) (ViewCompat.java:730)
at void android.support.v7.widget.RecyclerView.initAutofill() (RecyclerView.java:748)
at void android.support.v7.widget.RecyclerView.<init>(android.content.Context, android.util.AttributeSet, int) (RecyclerView.java:675)
at void android.support.v7.widget.RecyclerView.<init>(android.content.Context, android.util.AttributeSet) (RecyclerView.java:647)
at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:656)
at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:798)
at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:738)
at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:869)
at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:832)
at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
at void com.android.internal.policy.PhoneWindow.setContentView(int) (PhoneWindow.java:454)
at void com.android.internal.policy.HwPhoneWindow.setContentView(int) (HwPhoneWindow.java:293)
at void android.app.Activity.setContentView(int) (Activity.java:2515)
at void com.dmcbig.mediapicker.PickerActivity.onCreate(android.os.Bundle) (SourceFile:4)
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6910)
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1123)
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2757)
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2875)
at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1578)
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105)
at void android.os.Looper.loop() (Looper.java:156)
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6617)
at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:942)
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:832)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/xyz.dlhc.dleval.android-1/base.apk"],nativeLibraryDirectories=[/data/app/xyz.dlhc.dleval.android-1/lib/arm, /data/app/xyz.dlhc.dleval.android-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /system/vendor/lib, /product/lib]]
at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
at int android.support.v4.view.ViewCompat.getImportantForAutofill(android.view.View) (ViewCompat.java:730)
at void android.support.v7.widget.RecyclerView.initAutofill() (RecyclerView.java:748)
at void android.support.v7.widget.RecyclerView.<init>(android.content.Context, android.util.AttributeSet, int) (RecyclerView.java:675)
at void android.support.v7.widget.RecyclerView.<init>(android.content.Context, android.util.AttributeSet) (RecyclerView.java:647)
at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:656)
at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:798)
at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:738)
at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:869)
at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:832)
at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
at void com.android.internal.policy.PhoneWindow.setContentView(int) (PhoneWindow.java:454)
at void com.android.internal.policy.HwPhoneWindow.setContentView(int) (HwPhoneWindow.java:293)
at void android.app.Activity.setContentView(int) (Activity.java:2515)
at void com.dmcbig.mediapicker.PickerActivity.onCreate(android.os.Bundle) (SourceFile:4)
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6910)
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1123)
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2757)
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2875)
at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1578)
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105)
at void android.os.Looper.loop() (Looper.java:156)
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6617)
at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:942)
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:832)
I/HwPointEventFilter: do not support AFT because of no config
W/Glide: Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored
I/SendBroadcastPermission: action:wx_global_action, mPermissionType:0
E/Html5Plus-onResume: 1630396864663
E/UploadNetWort: initUploadData: mUploadedSize==10240 ===== length =10240 ====== buffer =10240
E/UploadNetWort: initUploadData: mUploadedSize==20480 ===== length =10240 ====== buffer =10240
E/UploadNetWort: initUploadData: mUploadedSize==25339 ===== length =4859 ====== buffer =10240
I/SendBroadcastPermission: action:wx_global_action, mPermissionType:0
I/SendBroadcastPermission: action:wx_global_action, mPermissionType:0
E/Html5Plus-onResume: 1630398414835
2 个回复
j***@163.com (作者)
有人遇到过这样的情况吗
j***@163.com (作者)
有人遇到过这样的情况吗