离子安卓:当从库中选择图像应用程序崩溃 [英] ionic android : when choose image from gallery the app crash

查看:96
本文介绍了离子安卓:当从库中选择图像应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击选择文件(输入=文件)从图库中选择图像后,选择Android上的图像应用程序崩溃,以及在ios上(苹果手机)。
我已经在androidmanifest.xml上添加了权限:

When I click on choose file(input="file") to choose an image from gallery , after select the image on android the app crash , and also on ios (iphone). I already add the permissions on the androidmanifest.xml:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus" />

仍然无效。

推荐答案

我在iOS中遇到了同样的问题。
尝试增加这些数据的Info.plist

I was getting the same issue in iOS. Try adding these data to info.plist

<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library.</string>
<key>NSCameraUsageDescription</key>
<string>This app requires access to the camera.</string>

对于android你可以共享logcat输出。

For android can you share the logcat output.


  1. 如果您没有Android Studio,您是如何构建应用程序的?你使用的是phonegap吗?

  2. 如果你有Android Studio,那么Android Studio预先安装了一个工具 Monitor 。当你打开监视器,然后可以看到应用程序的日志

  1. How are you building the app, if you don't have Android Studio? Are you using phonegap?
  2. If you have Android Studio, then a tool Monitor is pre installed with Android Studio. When you open Monitor, then the logs for the app can be seen

如果使用phonegap,你可以分享id,我可以如果你想要看看

If phonegap is used, can u share the id, I can take a look if you want

这篇关于离子安卓:当从库中选择图像应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆