react-native-syan-image-picker icon indicating copy to clipboard operation
react-native-syan-image-picker copied to clipboard

android9.0 拍照问题

Open TomWq opened this issue 6 years ago • 4 comments

安卓9.0手机拍拍照后报错,几率AS里的错误为 Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead. 然后通过检查发现可能的原因是调用的原生组件里调用了一个setSupportActionBar导致冲突 后来找到了解决办法: 在as项目下的values->styles.xml 文件里添加一个自定义的样式 <style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> 然后在 清单文件AndroidManifest.xml里面修改application的主题 android:theme="@style/AppTheme.NoActionBar" 并添加tools:replace="android:theme"属性 然后重新进行拍照 发现成功!

TomWq avatar Jan 15 '19 09:01 TomWq

嗯, 是合适的解决方案, 也可参考https://github.com/LuckSiege/PictureSelector/issues/603

NikiLee2016 avatar Jan 18 '19 15:01 NikiLee2016

也存在这个问题,升级到最新就行了

leoxiaoping avatar Apr 04 '19 07:04 leoxiaoping

试过目前看到的 issue 方案,都不行,,,Android 9 以上,拍照直接返回 undefined

atzcl avatar Sep 02 '19 09:09 atzcl

请问有解决方案吗

suwu150 avatar Oct 21 '21 05:10 suwu150