简体   繁体   English

IntelliJ IDEA 中包含的 Android 插件版本是什么?

[英]What is the Android plugin version included in IntelliJ IDEA?

... and how to find it out (in an authorative way)? ...以及如何找到它(以权威的方式)?

In Android Studio 0.8.11: when I check the same it shows 10.0.8.11.在 Android Studio 0.8.11 中:当我检查相同时,它显示 10.0.8.11。 which corresponds to http://tools.android.com/recent and http://developer.android.com/sdk/installing/studio.html .对应于http://tools.android.com/recenthttp://developer.android.com/sdk/installing/studio.html

In IDEA EAP 14: when I go to Settings > Plugins > Android Support the version number shown is 10.0 which doesn't correspond to a recent version of IDEA/Android Studio/SDK/API.在 IDEA EAP 14 中:当我转到设置 > 插件 > Android 支持时,显示的版本号是 10.0,它与 IDEA/Android Studio/SDK/API 的最新版本不对应。 All of the above at v10 are too old to be the default bundle in a bleeding edge software. v10 中的所有上述内容都太旧了,无法成为前沿软件中的默认包。

I checked the .jar files' META-INF , but no luck.我检查了.jar文件的META-INF ,但没有运气。 Some .jar names give a clue, here's what I was able to deduce:一些.jar名称提供了线索,这是我能够推断出的:

╔════════════════════════════════╦═══════════════╦═══════════════╦════════════════╗
║                                ║ IntelliJ IDEA ║ IntelliJ IDEA ║ Android Studio ║
╠════════════════════════════════╬═══════════════╬═══════════════╬════════════════╣
║ Version                        ║ 13.1.5        ║ 14 EAP        ║ 0.8.11         ║
║ Build                          ║ IC-135.1289   ║ IC-138.2458.8 ║ AI-135.1446794 ║
║ Date                           ║ 2014-09-30    ║ 2014-09-25    ║ 2014-09-18     ║
║ builder-model.jar              ║ 0.12.0        ║ 0.12.0        ║ 0.13.0         ║
║ Android Support Plugin version ║ 10.0          ║ 10.0          ║ 10.0.8.11      ║
║ IntelliJ IDEA equivalent       ║ 13.1.5        ║ 14.x          ║ 13.1.5 RC**    ║
║ Android Studio equivalent      ║ 0.8.?*        ║ 0.8.?*        ║ 0.8.11         ║
╚════════════════════════════════╩═══════════════╩═══════════════╩════════════════╝

* based on release dates of Gradle plugin and Android Studio Beta *基于Gradle 插件Android Studio Beta 的发布日期
** We've merged in the latest changes from IntelliJ 13.1.5 RC **我们已经合并了 IntelliJ 13.1.5 RC 的最新更改

The versions doesn't look that far apart, I'm wondering what the 0.8.?两个版本看起来相差不远,我想知道0.8.?是什么0.8.? version are exactly.版本完全相同。 I tried to swap plugins/android (and remove the duplicate EP: Designer.customizations ) in the IDEA 14 folder, but it's sparkling with NoSuchMethodError s after startup!我试图在 IDEA 14 文件夹中交换plugins/android (并删除重复的 EP: Designer.customizations ),但它在启动后闪烁着NoSuchMethodError

It's complicated, and this will be a long answer.这很复杂,这将是一个很长的答案。 Unfortunately, we don't have a good short answer, because we don't do versioning of the plugin in a way that makes sense.不幸的是,我们没有一个好的简短答案,因为我们没有以有意义的方式对插件进行版本控制。 This is something we should do.这是我们应该做的。

To answer the question requires looking through JetBrains' commit logs for their different versions of IntelliJ.要回答这个问题,需要查看 JetBrains 的不同 IntelliJ 版本的提交日志。 If I download the git repository for the Android plugin that ships with IntelliJ CE (see below for the longer answer with more details), I see this:如果我下载 IntelliJ CE 附带的 Android 插件的 git 存储库(有关详细信息的更长答案,请参见下文),我会看到:

  • 13.1.5: roughly equivalent to Android Studio 0.8.6. 13.1.5:大致相当于 Android Studio 0.8.6。 Requires and supports v0.12 of the Android Gradle plugin.需要并支持 Android Gradle 插件 v0.12。
  • 14: it tracks the most recent version of Android Studio, though it lags behind by maybe up to a week. 14:它跟踪最新版本的 Android Studio,尽管它可能落后一周。 The exact version will depend on when JetBrains did a source pull of the plugin from the Android team prior to cutting a given release.确切的版本将取决于 JetBrains 在切割给定版本之前从 Android 团队提取插件源代码的时间。 It requires v0.12 of the Android Gradle plugin and supports 0.13.它需要 Android Gradle 插件 v0.12 并支持 0.13。

On to the long explanation:进入冗长的解释:

The Android Build Tools team does 2-way code sharing with JetBrains. Android 构建工具团队与 JetBrains 进行两路代码共享。 Android Studio is built on top of the 135 branch of the IntelliJ codebase (which explains the IC-135 you see in its build number), so Android Studio is derived from IJ 13.1.5, with some modifications and patches that haven't been upstreamed. Android Studio 建立在 IntelliJ 代码库的 135 分支之上(它解释了您在其内部版本号中看到的 IC-135),因此 Android Studio 是从 IJ 13.1.5 派生而来的,其中有一些尚未经过的修改和补丁上游。 We're not planning on moving to the 138 branch by the time we get to 1.0, so even at release it will still be 13-based, not 14-based.我们不打算在到达 1.0 时迁移到 138 分支,因此即使在发布时它仍将基于 13,而不是基于 14。

On JetBrains' side, they mostly take upstream changes from Android for the plugin, but they also have folks working on the plugin on their side (and those changes get merged back down to the Android Studio end of things).在 JetBrains 方面,他们主要从 Android 对插件进行上游更改,但他们也有其他人在他们这边处理插件(这些更改会合并回 Android Studio 端)。 At this point in 13's life cycle, they do releases of it slowly and are more conservative about what they pull into the Android plugin (in the interests of stability), so it's not completely up-to-date.在 13 的生命周期中的这一点上,他们发布它的速度很慢,并且对他们引入 Android 插件的内容更加保守(为了稳定性),所以它不是完全最新的。 They do releases for bug fixes in the main product and not to pick up the latest Android plugin.他们发布主要产品中的错误修复,而不是选择最新的 Android 插件。

In general it's probably not possible to upgrade just your Android plugin if you're running IJ 13. Changes to the plugin frequently require changes to the underlying platform;一般来说,如果您运行的是 IJ 13,则可能无法仅升级您的 Android 插件。对插件的更改经常需要对底层平台进行更改; Android Studio will pick up those changes because its platform is releases along with its plugin, but IJ will need to wait until those changes are upstreamed. Android Studio 会接受这些更改,因为它的平台是随插件一起发布的,但 IJ 需要等到这些更改上传到上游。 Having said that the rate of these changes is quite slow now, but it still happens.话虽如此,这些变化的速度现在相当缓慢,但它仍然会发生。

For the 14 EAP release, they should be pulling changes from Android more rapidly, so that build should more closely reflect the current state of Android Studio, though again it depends on how often they do those pulls.对于 14 EAP 版本,他们应该更快地从 Android 拉取更改,以便构建应该更接近地反映 Android Studio 的当前状态,尽管这同样取决于他们执行这些拉取的频率。

It should be noted that we don't coordinate releases or code pulls with JetBrains for the most part, so a given release of 14 EAP will reflect the current state of Android plugin at the time they did the code pull.需要注意的是,我们在很大程度上不与 JetBrains 协调发布或代码拉取,因此给定的 14 EAP 版本将反映他们进行代码拉取时 Android 插件的当前状态。 As such, it may correspond to some state in between Android Studio releases.因此,它可能对应于 Android Studio 版本之间的某些状态。

To answer a question in the comments about why Android Studio and IntelliJ are separate products:要回答评论中关于为什么 Android Studio 和 IntelliJ 是独立产品的问题:

  • Android Studio is designed to provide a customized and streamlined experience for Android developers. Android Studio 旨在为 Android 开发人员提供定制和简化的体验。 It focuses on the Gradle build system (trying to use non-Gradle-based projects is discouraged), and a number of features and options that don't make sense for Android developers have been removed.它侧重于 Gradle 构建系统(不鼓励尝试使用非基于 Gradle 的项目),并且删除了许多对 Android 开发人员没有意义的功能和选项。
  • For users who want more flexibility, we encourage them to use IntelliJ CE.对于想要更多灵活性的用户,我们鼓励他们使用 IntelliJ CE。
  • IntelliJ Ultimate Edition, the paid version of the product, has additional features that are really powerful, and it's a great choice for those who need those features. IntelliJ Ultimate Edition 是该产品的付费版本,具有非常强大的附加功能,对于需要这些功能的人来说,它是一个不错的选择。
  • IntelliJ and the Android plugin were originally developed by IntelliJ, and neither of those are going away. IntelliJ 和 Android 插件最初是由 IntelliJ 开发的,它们都不会消失。 The Android team is working with JetBrains to improve Android support in both products, and provides Android Studio as an optimized product for its particular audience. Android 团队正在与 JetBrains 合作改进这两种产品对 Android 的支持,并提供 Android Studio 作为针对其特定受众的优化产品。

If you want everything in one IDE, then your best bet is to probably run IntelliJ CE or Ultimate.如果您希望在一个 IDE 中包含所有内容,那么您最好的选择可能是运行 IntelliJ CE 或 Ultimate。 It should have all the important functionality of Android Studio, though it may be rougher to use in spots.它应该具有 Android Studio 的所有重要功能,尽管在某些地方使用起来可能会比较粗糙。 If you find things that don't work right in it but do work in Android Studio (especially related to Gradle project support), then we consider it a bug, so please file it.如果您发现在 Android Studio 中无法正常工作但在 Android Studio 中可以工作的东西(特别是与 Gradle 项目支持相关),那么我们认为它是一个错误,因此请提交它。

For newer Intellij versions (2020+): The build-in Android Gradle Plugin version is visible in Settings -> Plugins -> Android : 10.android-version.intellijbuild-version对于较新的 Intellij 版本(2020+):内置 Android Gradle 插件版本在Settings -> Plugins -> Android可见:10.android-version.intellijbuild-version

Example:例子:

  • Android version: 4.0安卓版本:4.0
  • IDEA version: 203.5419.21 IDEA 版本:203.5419.21

在此处输入图片说明

Source: https://youtrack.jetbrains.com/issue/IDEA-252823#focus=Comments-27-4444522.0-0来源: https : //youtrack.jetbrains.com/issue/IDEA-252823#focus=Comments-27-4444522.0-0

I think I found a more specific answer, not perfect;我想我找到了一个更具体的答案,并不完美; it's really complicated as Scott said.正如斯科特所说,这真的很复杂。 I found that the android plugin is referenced from an external repository which is not on github in the getPlugins script :我发现 android 插件是从外部存储库引用的,该存储库不在getPlugins脚本中的github 上:

git clone git://git.jetbrains.org/idea/android.git android git 克隆 git://git.jetbrains.org/idea/android.git android

Find the git revision log for IntelliJ查找 IntelliJ 的 git 修订日志

  1. Go to Help > About in IntelliJ IDEA (or build.txt in install folder)转到 IntelliJ IDEA 中的“帮助”>“关于” (或安装文件夹中的build.txt
  2. Check the version number (current latest is IC-139.222.5)检查版本号(当前最新的是IC-139.222.5)
  3. http://git.jetbrains.org/?p=idea/android.git;a=shortlog;h=refs/tags/idea/139.222.5 http://git.jetbrains.org/?p=idea/android.git;a=shortlog;h=refs/tags/idea/139.222.5
  4. Find the last merge: Merge branch 'studio-1.0-release' of .../platform/tools/adt/idea找到最后一个合并: 合并分支 'studio-1.0-release' of .../platform/tools/adt/idea

Unfortunately I didn't find any clear pointer to revision range in the Google Android Studio repo , but you can try matching by dates.不幸的是,我没有在Google Android Studio repo 中找到任何指向修订范围的明确指针,但您可以尝试按日期进行匹配。

For 13.1.5 on the IntelliJ IDEA website > Downloads : Build: 135.1289对于IntelliJ IDEA 网站上的 13.1.5 > 下载:内部版本: 135.1289

Fallback倒退

To give a rough estimation one can check in给出一个粗略的估计,可以签入

IntelliJ IDEA\\plugins\\android\\lib\\android.jar\\META-INF\\plugin.xml IntelliJ IDEA\\plugins\\android\\lib\\android.jar\\META-INF\\plugin.xml

Where it's clear what is the minimum version is: <version>10.0.8.12</version> , since any commits after that may be merged until this line changes to the next version.很清楚最低版本是什么: <version>10.0.8.12</version> ,因为在此之后的任何提交都可能被合并,直到该行更改为下一个版本。

暂无
暂无

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

相关问题 此版本的 Android 支持 IntelliJ IDEA 插件 - This version of the Android Support plugin for IntelliJ IDEA 此版本的 Android Support plugin for IntelliJ IDEA 或 Android Studio 无法打开此项目,请使用 2021.1.1 或更高版本重试 - This version of the Android Support plugin for IntelliJ IDEA or Android Studio cannot open this project, please retry with version 2021.1.1 or newer IntelliJ IDEA 12-不兼容的Android版本错误 - IntelliJ IDEA 12 - Incompatible Android version error 无法解决“此版本的 Android 支持 IntelliJ IDEA 插件无法打开此项目,请使用 4.1 或更高版本重试。” - Cannot solve 'This version of the Android Support plugin for IntelliJ IDEA cannot open this project, please retry with version 4.1 or newer.' 无法识别的 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 SQLite”项 - Missing “Android SQLite” items in IntelliJ IDEA database plugin Intellij IDEA 2019中的离线Android Gradle插件3.5.0 - Offline Android Gradle Plugin 3.5.0 in Intellij IDEA 2019 无法使用Android Gradle Plugin 3.0。+使用IntelliJ IDEA - Can't use Android Gradle Plugin 3.0.+ with IntelliJ IDEA 是什么决定了IntelliJ IDEA / Android Studio中填充“外部依赖项”的原因? - What determines what populates “External Dependencies” in IntelliJ IDEA/Android Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM