英文:
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.
答案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呢?从“空白活动”开始对于理解这个集成开发环境是很有帮助的。当我刚开始学的时候,我也是这样做的。希望这能帮助你。
英文:
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,也许它是定制的,所以您有两种方式:
-
如果您已经安装了Java JDK,您需要在Android Studio和Java之间建立链接,可能在配置文件中。
-
您还没有安装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
-
if you have installed java JDK already you will need to make links between android studio and java, somehow maybe in the config
-
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论