Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Android Studio doesn't allow me to create Java Classes?

Starting from the update to Android Studio 2 days ago, it doesn't let me create Java classes anymore. And the current classes now have a strange symbol.

I tried to export and import many times with different configuration but they never worked. Any advice?

Here are two screenshots: enter image description hereenter image description here

Here is the structure of my Android Studio project. AndroidManifest is in the right place: enter image description here

like image 579
Stefano Munarini Avatar asked Dec 14 '13 20:12

Stefano Munarini


People also ask

Can we create Java project in Android Studio?

In an open Android Studio project, click File > New Module. Click More Modules > Java Library > Next, then fill in whatever you prefer for the names. A new module will appear as a folder on the same level as your "app" folder in the Project Structure. Open it and open the new Java class file.

Does Android studio still support Java?

On May 7, 2019, Kotlin replaced Java as Google's preferred language for Android app development. Java is still supported, as is C++.

Which Java Edition is used in Android Studio?

A copy of the latest OpenJDK comes bundled with Android Studio 2.2 and higher, and this is the JDK version we recommend you use for your Android projects.


1 Answers

Right click on the src folder, Mark Directory As -> Source Root.

like image 51
So Many Goblins Avatar answered Sep 22 '22 08:09

So Many Goblins