我刚刚为 IntelliJ 平台开发了 JSON Parser 插件。我将其发布在 JetBrains 上。
当我在 Android Studio 中搜索插件存储库时,我找不到我的插件。但它在IntelliJ社区版中显示(我目前正在使用它)。
下面是我的plugin.xml
<idea-plugin>
<id>com.godwin.json.parser</id>
<name>Json Parser</name>
<version>1.0</version>
<vendor email="godwinjoseph.k.com">Godwin</vendor>
<description><![CDATA[
Simple JSON Parser is an IntelliJ IDE plugin for validation and formatting JSON string<br>
]]></description>
<change-notes><![CDATA[
<h2>Version 1.0</h1>
Parse VALID JSON string only.
]]>
</change-notes>
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
<idea-version since-build="173.0"/>
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
on how to target different products -->
<!-- uncomment to enable plugin in all products
<depends>com.intellij.modules.lang</depends>
-->
<extensions defaultExtensionNs="com.intellij">
<!-- Add your extensions here -->
<toolWindow id="Json Parser" anchor="right"
factoryClass="com.jsonparse.ParserToolWindowFactory"/>
</extensions>
<project-components>
<component>
<implementation-class>com.jsonparse.ParserComponent</implementation-class>
</component>
</project-components>
But it is working fine in Android studio If I manually installed(Install from local)
提前致谢。
最佳答案
正如您在 plugin.xml
的评论中看到的那样您已在 update page 上发布对于您上传的插件,假定该插件仅与 IntelliJ IDEA 兼容,因为它没有指定任何依赖项。您需要取消注释 <depends>
在你的plugin.xml中标记并重新上传插件。
如果您的插件依赖于与 Java 相关的 IDE 功能,并且您希望它仅在 IntelliJ IDEA 和 Android Studio 中可用,请使用以下 depends
标签代替:
<depends>com.intellij.modules.java</depends>
关于java - 为什么我的 IntelliJ 插件没有显示在 Android Studio 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49994693/