解决升级到 Android Studio 4.1 后一些插件(GsonFormat、LayoutCreator ...)无法使用 作者: Chuwen 时间: 2020-11-24 分类: 软件 2 条评论 # 解决办法很简单 先卸载不能够使用的插件,然后 从 https://plugins.jetbrains.com/androidstudio 搜索插件,然后下载 `.jar` 插件 ![iShot2020-11-24 17.09.02.jpg][1] # 手动安装插件 > 打开设置页面: > 1. Windows:`Ctrl` + `,` (或者顶部菜单 -> File -> Setting) > 2. macOS:`Command` + `,` > > 选择 **Plugin**,然后点击 `齿轮⚙️图标`,选择 `Install Plugin from Disk ...` > ![iShot2020-11-24 17.04.20.jpg][3] > > 然后选择你刚刚下载的 `.jar` 后缀的插件 > ![后选择你刚刚下载的 .jar 后缀的插件][2] ## 安装完成记得重启 Android Studio [1]: https://cdn.nowtime.cc/2020/11/others/318498546.jpg [2]: https://cdn.nowtime.cc/2020/11/others/158885774.jpg [3]: https://cdn.nowtime.cc/2020/11/others/2703764031.jpg
Android 加了电话权限,运行还是闪退报错 作者: Chuwen 时间: 2019-12-07 分类: Android 评论 `AndroidManifest.xml` 文件 ``` ``` # 运行报错 ``` D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: cc.nowtime.seven, PID: 12685 java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:xxxxx cmp=com.android.server.telecom/.components.UserCallActivity } from ProcessRecord{e2ed078 12685:cc.nowtime.seven/u0a135} (pid=12685, uid=10135) with revoked permission android.permission.CALL_PHONE at android.os.Parcel.createException(Parcel.java:2071) at android.os.Parcel.readException(Parcel.java:2039) at android.os.Parcel.readException(Parcel.java:1987) at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:3851) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1705) at android.app.Activity.startActivityForResult(Activity.java:5192) at android.app.Activity.startActivityForResult(Activity.java:5150) at android.app.Activity.startActivity(Activity.java:5521) at android.app.Activity.startActivity(Activity.java:5489) at cc.nowtime.seven.MainActivity$1.onClick(MainActivity.java:36) at android.view.View.performClick(View.java:7125) at android.view.View.performClickInternal(View.java:7102) at android.view.View.access$3500(View.java:801) at android.view.View$PerformClick.run(View.java:27336) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.wm.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1043) at com.android.server.wm.ActivityStarter.startActivity(ActivityStarter.java:760) at com.android.server.wm.ActivityStarter.startActivity(ActivityStarter.java:583) at com.android.server.wm.ActivityStarter.startActivityMayWait(ActivityStarter.java:1288) at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:514) Process 12685 terminated. ``` > ` java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:xxxxx cmp=com.android.server.telecom/.components.UserCallActivity } from ProcessRecord{e2ed078 12685:cc.nowtime.seven/u0a135} (pid=12685, uid=10135) with revoked permission android.permission.CALL_PHONE` # 原因 你的 APP 添加**拨打电话权限**,但是未申请拨打电话权限,所以报错,解决办法: - **APP 主动申请获取** 拨打电话权限 - **手动授予** 拨打电话权限 # 主动授予拨打电话权限 1. 打开 **设置** > **应用和通知** 2. **找到你的应用** ![Snipaste_2019-12-07_20-13-40.png][1] 3. 然后允许对应权限就可以了 ![Snipaste_2019-12-07_20-14-38.png][2] # APP 主动申请获取 拨打电话权限 > 自己百度 ❀???? [1]: https://cdn.nowtime.cc/2019/12/07/512779244.png [2]: https://cdn.nowtime.cc/2019/12/07/1174856951.png