preface

I haven’t written my blog for a long time. I have been very busy with my work and life in recent months. Before the plan to write “Android mainstream open source framework” series is also broken more, one is really no time, two is this kind of analysis of the source code article few people see, Glide source 2 articles I spent nearly 2 weeks (every night to go off work to write) to finish, the result of reading only hundreds of. Of course you don’t blog for other people to read, but anyone who’s ever blogged knows that the more people read your blog, the more powerful it will be!

Let’s get down to business! I’m writing today about my open source project, ScreenAdaptation. Some people have reported that ScreenMatch is not compatible with their Android Studio after they upgraded to 4.1. Not only did people on Github respond, but there were several private chats about me as well. That I think certainly a lot of people also encountered, and they may not solve, because are these two days of upgrade, it is difficult to search the relevant problems on the Internet. Upgrade to 4.1 when you get back from work. If you find this problem, record a wave!

Here to say, do not immediately update to the latest version of the hand damage! Everyone knows that every update is a bunch of bugs! Especially don’t update the company, or you’ll blow it up, trust me!

The problem record

Question 1

Many plugins are no longer compatible…

This is the problem they asked me above. The following error was reported when OPENING AS:

// Plugin Error: Plugin "XXX" is not compatible (only supported in IntelliJ IDEA) Plugin Error: Plugin "xxx" is incompatible (supported only in IntelliJ IDEA)Copy the code

Maybe it is the reason why the plug-in is not compatible after AS is upgraded to 4.1, then I want to upgrade the plug-in. Then go to Settings–>Plugins–>Installed and find that the Plugins are Installed.

The plugin is not compatible with the plugin, as shown in the following figure:

Then run to StackOverflow to find the cause of the incompatibility, which some say was caused by a change in the location of the AS 4.1 plug-in installation.

Solution 1 (for plug-in users) : Locate the plug-in installation location, delete the faulty plug-in, restart the AS, and reinstall the AS. The plug-in installation location is as follows:

C: \ Users \ UserName \ AppData \ \ Roaming \ Google AndroidStudio4.1 \ pluginsCopy the code

AS before the plugin installation position for 4.1: C: \ Users \ UserName AndroidStudio4.0 \ config \ plugins

Sometimes you will encounter incompatibility when you delete it and reinstall it, so you need to uninstall it in AS first and then reinstall it, AS shown in the following picture:

OK, now you can reinstall the plug-in to work properly. However, when you turn off AS and open it again, the plugin magically disappears…

The final solution is to copy the plug-in directly to the system plug-in installation path (note that this is the system plug-in installation path, the above is the user plug-in installation path). The system plug-in installation path is as follows:

C:\Program Files\Android\Android Studio\plugins
Copy the code

Solution 2 (for plug-in developers) : Solution 1 is for plug-in users. This solution solves the problem, but it is not possible to use this method every time a new plug-in is installed. It’s up to the plugin developers to rewrite the code to be compatible with AS 4.1. To solve this problem, modify the plugin configuration file plugin.xml and add the following dependencies:

<depends>com.intellij.modules.java</depends>
Copy the code

Then generate a new plug-in and upload it to the plugin library so that other users can use it. For plug-in development, you can see my other article on how to create an Android Studio plug-in by yourself.

Question 2

Code is not highlighted, and written error code is not prompted…

Solution:

  1. Based on the error, remove all the problematic plug-ins (in most cases, just remove the Butterknife plug-in) and restart the AS. The plug-in installation path is as follows:
C: \ Users \ UserName \ AppData \ \ Roaming \ Google AndroidStudio4.1 \ pluginsCopy the code

If not, use step 2.

  1. Delete all plug-ins.

Question 3

Android Studio startup failed…

Solution:

  1. If an error is reported, delete all the faulty plug-ins and restart the AS. The plug-in installation path is as follows:
C: \ Users \ UserName \ AppData \ \ Roaming \ Google AndroidStudio4.1 \ pluginsCopy the code

If not, use step 2.

  1. Delete all plug-ins.

Question 4

Gradle sync failed: Your host software aborted an established connection…

Solution: the reason is that the computer turned on the hot spot. Close the hotspot, Sync Project, and then open the hotspot again.

The last

Because I only updated the AS at home, I only found these problems at present, and I will record other problems later

About me

I am Wildma, CSDN certified blog expert, excellent author of Simple book programmer, good at screen adaptation. If the article is helpful to you, a “like” is the biggest recognition for me!