简体   繁体   English

Intellij IDEA (Android Studio) Kotlin 插件的目的是什么?

[英]What is the purpose of Intellij IDEA (Android Studio) Kotlin plugin?

I want to create a Kotlin project in Android Studio.我想在 Android Studio 中创建一个 Kotlin 项目。 To use Kotlin I need to install a Kotlin plugin and apply it inside the project (in .gradle file).要使用 Kotlin,我需要安装一个 Kotlin 插件并将其应用到项目中(在.gradle文件中)。

Can anyone explain what exact functionality Kotlin plugin adds to Android Studio and why we don't need a similar plugin for Java?谁能解释一下 Kotlin 插件添加到 Android Studio 的确切功能以及为什么我们不需要类似的 Java 插件?

You seem to be confusing the Gradle Kotlin plugin and the IDEA/AS Kotlin plugin .您似乎混淆了Gradle Kotlin 插件IDEA/AS Kotlin 插件 They are entirely different.它们完全不同。

what exact functionality Kotlin plugin adds to Android Studio Kotlin 插件添加到 Android Studio 的确切功能

The Gradle plugin doesn't know anything about IDEA and so doesn't add any functionality to it (AFAIK). Gradle 插件对 IDEA 一无所知,因此不会为其添加任何功能(AFAIK)。 Except of course when building with Gradle it'll compile the Kotlin part of the project.除了使用 Gradle 构建时,它会编译项目的 Kotlin 部分。

The IDEA plugin adds support for the language (parsing, highlighting, compiling, finding errors while you type, actions, etc. etc. etc.) into IDEA and Android Studio and doesn't add anything to Gradle. IDEA 插件在 IDEA 和 Android Studio 中添加了对语言的支持(解析、突出显示、编译、在键入时查找错误、操作等),并且没有向 Gradle 添加任何内容。

why we don't need a similar plugin for Java为什么我们不需要类似的 Java 插件

You do.你做。 For Gradle, see https://docs.gradle.org/current/userguide/java_plugin.html (Gradle Android plugin includes it).对于 Gradle,请参阅https://docs.gradle.org/current/userguide/java_plugin.html(Gradle Android 插件包含它)。 For IDEA/Android Studio, Java support is also really done by plugins, they are just built-in.对于 IDEA/Android Studio,Java 支持也是真正由插件完成的,它们只是内置的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 手动配置Android Studio(或IntelliJ IDEA)插件 - Configure an Android Studio (or IntelliJ IDEA) plugin manually 在 Windows 上的 Android Studio 中调试 Intellij Idea 插件 - Debugging Intellij Idea Plugin in Android Studio on Windows IntelliJ IDEA 中包含的 Android 插件版本是什么? - What is the Android plugin version included in IntelliJ IDEA? 如何在 Android Studio 和 IntelliJ IDEA 的项目中共享 Kotlin 格式约定? - How to share Kotlin formatting conventions in project for Android Studio and IntelliJ IDEA? 无法识别的 Android Studio(或 IntelliJ IDEA 的 Android 支持插件)错误 - Unrecognized Android Studio (or Android Support plugin for IntelliJ IDEA) error Android Support plugin for IntelliJ IDEA (or Android Studio) 打不开这个项目 - Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project 是什么决定了IntelliJ IDEA / Android Studio中填充“外部依赖项”的原因? - What determines what populates “External Dependencies” in IntelliJ IDEA/Android Studio? 从Android Studio到智能IDEA - From Android Studio to intelliJ IDEA Android Studio 4.1 插件错误:插件 * 不兼容(仅在 IntelliJ IDEA 中支持) - Android Studio 4.1 Plugin Error: Plugin * is incompatible (supported only in IntelliJ IDEA) 如何在IntelliJ IDEA / Android Studio中添加自定义Kotlin后缀完成? - How can I add a custom Kotlin postfix completion in IntelliJ IDEA / Android Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM