环境:Android Studio4.2.2

修改项目 .idea下的gradle.xml文件,添加

<option name="delegatedBuild" value="false" />

如图:

安卓 AS运行main方法报错_android

重新Rebuild即可。
感谢