Android studio 不能执行main方法 运行main方法
Android Studio 开发安卓程序,偶尔也需要执行下main方法,简单方便快捷,但是奇葩的是不行。!(data/attachment/forum/202209/23/103351h5zobilm27zp3whl.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
两个方法:
### coverage
需要运行main方法的类,源码上面,右键 Run xxx with Coverage即可
!(data/attachment/forum/202209/23/103435gjoqw434klg48xrk.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
### 修改配置
!(data/attachment/forum/202209/23/103530v1uk9n1ygzt4mjti.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
注意位置:.idea 下面的gradle.xml
```xml
<option name="delegatedBuild" value="false" />
```
位置如下图所示:
!(data/attachment/forum/202209/23/103654f7l8l31o0a1wavml.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
!(data/attachment/forum/202206/16/141330jha7st9soow8772i.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "common_log.png")
`转载务必注明出处:程序员潇然,疯狂的字节X,https://crazybytex.com/thread-192-1-1.html `
页:
[1]