您当前的位置: 首页 > 
  • 0浏览

    0关注

    674博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

> Could not create task ‘:app:MyTest.main()‘. > SourceSet with name ‘main‘ not found.问题修复

沙漠一只雕得儿得儿 发布时间:2022-06-22 12:02:15 ,浏览量:0

Android studio 无法执行Java类的main方法问题及解决方法 

FAILURE: Build failed with an exception.

* Where:
Initialization script 'C:\Users\eerdunsang\AppData\Local\Temp\MyTest_main__.gradle' line: 21

* What went wrong:
A problem occurred configuring project ':app'.
> Could not create task ':app:MyTest.main()'.
   > SourceSet with name 'main' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 9s
9:10:31: Task execution finished 'MyTest.main()'.

解决方法: 在.idea文件夹下的gradle.xml文件中 标签下添加,然后重新运行就可以了

 

 

关注
打赏
1657159701
查看更多评论
立即登录/注册

微信扫码登录

0.0369s