requires android.permission.CALL_PHONE解决办法

来源:互联网 发布:php插件怎么下载 编辑:程序博客网 时间:2024/05/17 18:18

异常信息

java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:xxx-xxx-xxxx cmp=com.android.phone/.OutgoingCallBroadcaster } from ProcessRecord{406ceac8 342:com.example.ex_37/10043} (pid=342, uid=10043) requires android.permission.CALL_PHONE

分析原因

由于我的应用要拨打电话,所以需要配置相应的权限信息

解决办法

需要在(功能清单文件中)AndroiManifest.xml    Application外添加<uses-permission android:name="android.permission.CALL_PHONE"/> 

 

参考文档:http://blog.csdn.net/liuhe688/article/details/6417983

原创粉丝点击