Android Studio4.1 Pit trip

I recently upgraded the AS4.2 version, and found various problems. After a lot of tossing and turning back, I am here to record this trip to the pit. Be cautious when upgrading, hahahaha.

A few days ago, I wrote a new application and prepared to upgrade AS to use the latest version of the library together. It turns out that neither the GsonFormat plugin nor the Butterknife plugin can be used, and the code highlighting is gone. . .

Solution 1: Delete the error reporting plug-in and roll back the version

In response to these problems, the majority of netizens also gave some suggestions to delete the plug-in that reported the error. But this makes me who is used to using these two plug-ins what to do, how to feel uncomfortable. Later, I saw that some netizens said that the Beta version of AS4.2 can be installed directly, and the Butterknife plug-in can be used. After I tried to download the 4.2 version, I found that it did not solve this problem.

In the end, I rolled back the version of AS, which was a failed upgrade execution. . .

Here, if you have any questions about how to roll back the AS version, please see the steps below.
insert image description here
insert image description here
insert image description here
Just download the installation package of version less than 4.1 and reinstall it.

Solution 2: Install a plug-in with similar functions

GsonFormat downloads GsonFormatPlus, which is similar to GsonFormat. It seems that it will Lombokgenerate beans together, and no longer produce getter and setter methods separately;
insert image description hereButterknife downloads Android Butterknife Injections (support kotlin). After downloading, you will find that it can be used, but the code highlighting is gone. This is because it conflicts with the previous Android Butter knife Zelezny. Just uninstall the previous one.
insert image description here

About the Android Studio Bumblebee bumblebee version can not use the solution of Lombok:

After upgrading the Bumblebee version of AS, you will find that the Lombok plug-in will prompt that the version is incompatible and can only be used on older versions. In fact, there is no need to roll back the version, and the automatic installation will not work. Let's try manually. With the mentality of giving it a try, maybe it will work, right? Let's get started~
Open the jetbrains plug-in center to find the download address of Lombok
insert image description here
, as shown in the figure below: Select the latest version and click Download, unzip it after the download is complete, then find the installation directory of AS, and copy the file lombok-plugin we unzipped just now to AS plugins directory, and then restart the AS, maybe there will be surprises, anyway, mine is ok, the get and set methods are no longer popular, fine, continue coding.

Add the dependency usage of the Lombok plugin:

//https://github.com/projectlombok/lombok
implementation 'org.projectlombok:lombok:1.18.8'
annotationProcessor 'org.projectlombok:lombok:1.18.8'

Guess you like

Origin blog.csdn.net/u012230055/article/details/110941608