Android N使用Cordova camera plug-in相机的额外步骤

Android N使用Cordova camera plug-in相机的额外步骤
java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider
java.lang.ClassNotFoundException: Didn’t find class “android.support.v4.content.FileProvider”
如果报以上的错误的话,先导入android.support.v4的包,版本不能高于sdk的版本,
导入android.support.v4包进去后如果报错的话,AndroidManifest.xml文件application标签中加上
《provider android:authorities=“com.ZLJ.provider” android:exported=“false”
android:grantUriPermissions=“true” android:name=“android.support.v4.content.FileProvider”>
《meta-data android:name=“android.support.FILE_PROVIDER_PATHS” android:resource="@xml/provider_paths" />
《provider>

android:authorities 里面的值com.ZLJ改成 自己 AndroidManifest.xml文件manifest标签里面的package属性值

然后打开res文件夹再打开xml文件夹,再打开config.xml文件,如果该文件中有《platform name=“android”》的话,就在该标签中加入《preference name=“applicationId” value=“com.ZLJ”》,value值同样为AndroidManifest.xml文件manifest标签里面的package属性值,没有该标签,就直接
《platform name=“android”》
《preference name=“applicationId” value=“com.ZLJ”/》
《/platform>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值