I can't create a new project with java language anymore on Android Studio Hedgehog?
Asked Answered
M

5

7

I downloaded android studio latest version Hedgehog, and I found it strange that there is no longer an option to select JAVA languages on the new project screen. Is this a bug? did I do something wrong? Or is there really no more support for the java language in Hedgehog? How can I resolve this? Thanks for any help! Unfortunately I didn't find any answer to this problem on the internet.

enter image description here

I do not know what to do.

Mineralize answered 10/2, 2024 at 12:26 Comment(2)
That option is just for the Gradle files. You will still be able to create and use Java classes in your project with that option selectedSounder
On a side note. I know this does not solve the problem but... at first I did not want to use Kotlin but now that I'm using it I had an epiphany. So if you are just using Java because you never tried Kotlin, it might be worth giving it a try. It makes things so much easier once you get used to it. (Needless to say, it is interoperable so you can still write Java code if you want to)Galleon
G
2

Is this a bug?

No.

Or is there really no more support for the java language in Hedgehog?

Every Kotlin project can also use Java. All the Java vs. Kotlin choice did before was control whether Kotlin was configured in the project.

How can I resolve this?

Just create Java classes.

Gormandize answered 10/2, 2024 at 12:37 Comment(1)
Yes, correct. Also, this happens when Empty Activity (default is Jetpack Compose), if you select Empty Views Activity, it will have option in the wizard itself.Dockery
C
5

You can create new project using java language using below steps:

  1. Open Android Studio
  2. click on new project
  3. Select Empty Views Activity
  4. Click on next button
  5. Then select Java from Language drop down section
  6. Then select Groovy DSL (build.gradle) from Build Configuration Language drop down
  7. Now click Finish button.
Cosec answered 20/2, 2024 at 10:31 Comment(0)
G
2

Is this a bug?

No.

Or is there really no more support for the java language in Hedgehog?

Every Kotlin project can also use Java. All the Java vs. Kotlin choice did before was control whether Kotlin was configured in the project.

How can I resolve this?

Just create Java classes.

Gormandize answered 10/2, 2024 at 12:37 Comment(1)
Yes, correct. Also, this happens when Empty Activity (default is Jetpack Compose), if you select Empty Views Activity, it will have option in the wizard itself.Dockery
P
1

new project wizard Android Studio as of 09202024

While in the New Project Wizard, do not choose the "Empty Activity". Instead, choose the "Empty Views Activity" template. This will allow you to select your language preference. So you don't have to build from scratch to use Java. You can also do what the others proposed and start from scratch. There are no rules here but it does increase the barrier of entry into Android development.

TANGENT => After some exploration I found that Android Studio color coded the templates in the wizard. Any purple banner'ed template do not have a field that allows the developer to choose their language preference. Any green banner'ed template allows the developer to choose their language preference.

I attempted some screen shots but this platform is understandably harsh on noobs to it. I guess I need some cred... hopefully I get some from this effort :) the next form when a green banner'ed template is selected the next form when a purple banner'ed template is selected

Proem answered 30/9, 2024 at 14:46 Comment(0)
A
0

android studio hedgehog starts with kotlin files but we can still create the java classes. create a new activity and choose the java in source language section.here is the opotions

Augmenter answered 14/2, 2024 at 17:15 Comment(0)
T
0

Not all templates support Java. Try to choose another template for the new project, e.g. no activity or basic view activity, and then you will find a language droplist where you can select your preferred language.

Tyrosine answered 10/10, 2024 at 18:13 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.