Git Product home page Git Product logo

arms-template-plugin's Introduction

Android Studio 4.1中的模板插件基本说明

有已经编译好了的plugin,在Releases目录下,可以直接用

支持最新Android Studio

支持ideal 203 ~ 241.* 版本

下面几张图是修改的基本的配置和查询版本

1.使用JetBrains IntelliJ 插件模板

打开 [intellij-platform-plugin-com.github.sionsxie.armstemplateplugin.template](https://github.com/JetBrains/intellij-platform-plugin-com.github.sionsxie.armstemplateplugin.template)
点击那个绿色按钮 Use this com.github.sionsxie.armstemplateplugin.template 把这个项目copy到自己的Git下,然后下载下来进行相应的修改,如下图

2.修改相应位置

gradle.properties
       //这个是插件的Group 和包名相同就行
       pluginGroup = com.github.sionsxie.armstemplateplugin
       //这个是插件名字
       pluginName = arms-template-plugin
       //这个是插件版本 随意改
       pluginVersion = 0.0.3
       //主要修改下面这两值
       //如果不想调试各种版本兼容的话可以把 build.gradle.kts里的intellij里的updateSinceUntilBuild设置为false
       //这个是最小支持版本,就是Android Studio关于里的那个 #AI-201.8743.12. 这个AI后面的第一个数字 201
       pluginSinceBuild = 201
       //这个是最大支持版本,as版本更新之后,一般改改这里就行了(as对应的ideal的版本)
       pluginUntilBuild = 203.*

       //这个是平台插件复制过去就ok了
       platformPlugins = java, com.intellij.java, org.jetbrains.android, android, org.jetbrains.kotlin

src\main\resources\META-INF\plugin.xml
        //添加三个插件依赖
        <depends>org.jetbrains.android</depends>
        <depends>org.jetbrains.kotlin</depends>
        <depends>com.intellij.modules.java</depends>

3.添加自己的模板代码

参考other里的代码

4.生成插件Jar

如下图,运行那个都行

tip:

  • 主要就修改 pluginUntilBuild 这个最大支持版本号的值就行了,修改之后直接运行 buildPlugin 这个任务即可,打包成jar即可,打包的jar在 build/libs 目录下
  • 不想自己生成就直接下载我打包好的插件即可,在Releases目录下
  • 如果出现中文乱码在 build.gradle.kts tasks里的withType 加 options.encoding = "UTF-8"

arms-template-plugin's People

Contributors

actions-user avatar sionsxie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arms-template-plugin's Issues

最新版的AS打不开

升级最新版后,插件不起作用。
Android Studio Arctic Fox | 2020.3.1
Build #AI-203.7717.56.2031.7583922, built on July 27, 2021

升级新版本后一直报错

Task :runIde FAILED
[gradle-intellij-plugin :arms-template-plugin:runIde] Cannot find java executable in: C:\Users\Administrator.gradle\caches\modules-2\files-2.1\com.jetbrains\jbre\jbr-17.0.5-windows-x64-b653.23\extracted
[gradle-intellij-plugin :arms-template-plugin:runIde] Cannot resolve runtime with ideDir='C:\Users\Administrator.gradle\caches\modules-2\files-2.1\com.jetbrains.intellij.idea\ideaIC\2022.3.1\2a2986db4e11c3d378b4d1c8b9fd040cd6d99802\ideaIC-2022.3.1', version='version'
[gradle-intellij-plugin :arms-template-plugin:runIde] Cannot resolve runtime with ideDir='C:\Users\Administrator.gradle\caches\modules-2\files-2.1\com.jetbrains.intellij.idea\ideaIC\2022.3.1\2a2986db4e11c3d378b4d1c8b9fd040cd6d99802\ideaIC-2022.3.1'
����: �Ҳ������޷��������� com.intellij.idea.Main
ԭ��: java.lang.ClassNotFoundException: com.intellij.idea.Main

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':runIde'.

Process 'command 'G:\Program Files\Android\Android Studio\jbr\bin\java.exe'' finished with non-zero exit value 1
image
image
麻烦大佬帮忙看看

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.