How execute core JAVA programs ( Stand alone Java projects ) in Android Studio

Publicado em: 05 Março 2019
no canal de: Dipenparmar12
740
11

Using this method you can have Java modules and Android modules in the same project and also have the ability to compile and run Java modules as stand alone Java projects.

1. Open your Android project in Android Studio. If you do not have one, create one.
2. Click File / New Module. Select Java Library and click Next.
3. Fill in the package name, etc and click Finish. You should now see a Java module inside your Android project.
4. Add your code to the Java module you've just created.
5. Click on the drop down to the left of the run button. Click Edit Configurations.
6. In the new window, click on the plus sign at the top left of the window and select Application
7. A new application configuration should appear, enter in the details such as your main class and classpath of your module.
8. Click OK.

Now if you click run, this should compile and run your Java module.

If you get the error Error: Could not find or load main class..., just enter your main class again even if the field is already filled in. Click Apply and then click Ok

Java,
Android,
Android Studio,
Soft,
SoftWe


Nesta página do site você pode assistir ao vídeo on-line How execute core JAVA programs ( Stand alone Java projects ) in Android Studio duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Dipenparmar12 05 Março 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 740 vezes e gostou 11 espectadores. Boa visualização!