Home>
When I try to run in Android Studio, I get the following error message:
14:59:41: Executing task'Test1.main ()' ...
Executing tasks: [Test1.main ()] in project C: \ Users \ ○○ \ AndroidStudioProjects \ MyApplication1
Starting Gradle Daemon ...
Gradle Daemon started in 2 s 829 ms
FAILURE: Build failed with an exception.
* Where:
Initialization script'C: \ Users \ ○○ \ AppData \ Local \ Temp \ Test01_main__.gradle' line: 21
* What went wrong:
A problem occurred configuring project': app'.
>Could not create task': app: Test1.main ()'.
>SourceSet with name'main' not found.
* Try: 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 12s
14:59:55: Task execution finished'Test1.main ()'.
Corresponding source code
java
public class Test1
{
public static void main (String [] args)
{
System.out.print ("Hello World");
}
}
What I tried
After getting this error, I tried to recreate the project or reinstall Android Studio, but I get the same error.
Supplementary information (FW/tool version, etc.)The version of Android Studio is 4.0.1.
-
Answer # 1
Related articles
- java - error in android studio
- java - i want to fix an error in android studio
- java - error when building android studio ml kit for firebase [plugin with id'comandroidapplication' not found]
- android studio - about error resolution of flutter package cover
- android studio - null-related error, the application crashes and cannot be resolved
- about error in android studio xml file
- i get an error when i try to put opencv into android studio
- i get an error when building in android studio
- onclick - i am developing an application in android studio if you execute it, it will be forcibly terminated
- java - about type conversion of view in android studio
- java - i get an error in android build error: can't find symbol
- module name is not displayed in android studio
- java - i want to open a site with a fixed url when i tap the icon of the android studio app
- android studio - i want to write a program that switches images using viewpager2
- how to assign a value to datepicker of view in android studio
- the text editor of android studio is not displayed
- i got an unexpected error when i moved the files i had created to the latest version of android studio
- android studio - flutter, dart: the value of the local variable'uint8list' isn't used is displayed even though the declared vari
- android studio - show message if one of the two edittexts is empty
Trends
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- javascript - how to check if an element exists in puppeteer
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
Is this helpful?
http://stackoverflow.com/questions/275023