Android Studio plugin development and use

Source: Internet
Author: User

Recently because the project needed to develop a plugin for Android studio (automating the configuration of managing Android projects), here is a description of the entire process, from development to application.

First of all, I don't know how to develop plug-ins directly on Android studio, however Android Studio is based on IntelliJ idea, so I want to develop on IntelliJ and then go around the jar package, applied on studio. Because I found https://plugins.jetbrains.com/a lot of plugins are available on Android studio and IntelliJ, and the final verification is possible.

1. Download IntelliJ idea, download and install the process will not say more.

2. Create the plugin project, File->new project, and follow the actions, Note: For the project SDK, if you do not need to create one, click New, and then point to IntelliJ Idea's installation directory is OK.

3. After the project is created, you can code it. A simple example is to create a component,firstcomponent and then create a action,firstaction that is created in such a way as:


In addition, when you create an action, you need to select groups and actions, which is the portal that launches the plugin, for example, the groups that I chose is windowmenu, and then clicking Window on Windows will show my plugin,firstaction.

4. Test, click Run->edit Configrations...->run, then you will start a IntelliJ, you can test.

5. Export the jar, click Build->make Project, then click Prepare Plugin Model ..., and a jar package will be generated in the project.

6. Finally applied in Android Studio, open Android Studio,file->settings, for example, after restarting studio, the plugin was installed successfully.


Android Studio plugin development and use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.