这个问题把我坑了好一会
最后参考
https://www.cnblogs.com/woaixingxing/p/7754873.html
https://blog.youkuaiyun.com/runner__1/article/details/53482565

在Android studio的Terminal 直接输入命令
gradlew compileDebug --stacktrace
然后
gradlew compileDebugSources --stacktrace -info

找到了错误地方并改正
最后谢谢两位博主分享,学到一种新方法,当时都找的头大