About the error message java.lang.ClassNotFoundException: com.android.tools.lint.client.api.Vendor

After a long time, it is necessary to connect Android and Unity again. It is necessary to export an AAR package from Android Studio, and an error is reported when exporting the package: "java.lang.ClassNotFoundException: com.android.tools.lint.client.api.Vendor"
This problem seems to have been encountered before, but after a long time, I have no impression, so I checked the Internet again.
A workaround recommended by many is to add

lintOptions {
    
     

    checkReleaseBuilds false

}

But after I tried it, it still didn’t work. I didn’t solve this problem. Then I compared the configuration of several project files that could successfully package AAR before, and found that it might be caused by the version of gradle tool. I have opened a new project because I upgraded gradle. In the future, the default version is: "com.android.tools.build:gradle:4.0.0", and the previous ones are all 3.5.0, so I changed the version to "com.android.tools.build:gradle:3.5.0", and then it can be packaged normally.

So at least for me personally, this error may be caused by the version of the gradle tool.

It is hereby recorded for future inquiries.

Guess you like

Origin blog.csdn.net/EverNess010/article/details/128311339