无法在创建新项目时将语言更改为Java,而这是在Android中的情况。

huangapple go评论54阅读模式
英文:

Unable to change the language to Java in Android while creating new project

问题

我是新手使用Android Studio。我正在尝试使用Java语言创建新项目。但默认情况下设置为Kotlin语言。下拉框不起作用。我应该怎么办?有人可以帮帮我吗?

我正在尝试使用Java语言创建新项目。
无法从下拉框中选择语言。

英文:

I am new to android Studio. I am trying to create new project in java language. But the language is set to kotlin by default. The drop down does not work. What shall I do? Can someone help me out here?

I am trying to create new project in java language.
The drop down does not work from which i can choose the language.
无法在创建新项目时将语言更改为Java,而这是在Android中的情况。

答案1

得分: 1

如果您看向该屏幕截图的顶部,您选择了“Empty Compose Activity”模板。该模板使用Jetpack Compose进行UI设计,而Jetpack Compose需要Kotlin。如果您希望使用Java,您将需要选择不同的起始模板。

或者,考虑学习Kotlin,因为Kotlin是Android应用开发的长期方向。顺便说一下,这里是我关于Kotlin的免费书籍

英文:

If you look towards the top of that screenshot, you chose the "Empty Compose Activity" template. That uses Jetpack Compose for its UI, and Jetpack Compose requires Kotlin. You will need to choose a different starter template if you wish to use Java.

Or, consider learning Kotlin, as Kotlin is the long-term direction for Android app development. FWIW, here is a free book of mine on Kotlin.

答案2

得分: 0

为什么不创建一个“空白活动”来学习Android Studio呢?从“空白活动”开始对于理解这个集成开发环境是很有帮助的。当我刚开始学的时候,我也是这样做的。希望这能帮助你。

英文:

无法在创建新项目时将语言更改为Java,而这是在Android中的情况。

Why don't you create "Empty Activity" for learning android studio.
Starting with "Empty Activity" is good for understanding this IDE.
I did the same way when I was starting.
Hope this would help you.

答案3

得分: -1

翻译结果如下:

直接解决您的问题,正如您所看到的,Android Studio 无法识别您的计算机上的Java路径,或者您没有完全安装Android Studio,也许它是定制的,所以您有两种方式:

  1. 如果您已经安装了Java JDK,您需要在Android Studio和Java之间建立链接,可能在配置文件中。

  2. 您还没有安装Java,所以您需要安装Java JDK。

安装和设置Android Studio以及Java JDK和SDK,由techpassmaster提供

这是我找到的最接近的链接,其中包含您需要单独执行的所有步骤。

英文:

straight forward for your problem
as you see the android studio didn't recognize the java path from your PC or you didn't install android studio fully maybe it's customized so you have 2 way

  1. if you have installed java JDK already you will need to make links between android studio and java, somehow maybe in the config

  2. you didn't install java yet so (you need to install Java JDK)

install-setup-android-studio-java-jdk-sdk BY techpassmaster

this the closest link I got containing all of steps you need individually

huangapple
  • 本文由 发表于 2023年2月19日 21:26:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/75500447.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定