ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

Android Studio: Plugin with id com.android.library not found

2026/8/5 15:41:27 拓冰建站 浏览量
Android Studio: Plugin with id com.android.library not found

导入第三方jar 源码时,经常会报下面错误:

 Plugin with id 'com.android.library' not found

这是由于创建jar 源码时的 gradle 版本和你本地 studio gradle版本不一致导致。

最简单做法:

1.新建一个项目

2.打开最外层 build.gradle

3.拷贝下面代码

    buildscript {repositories {google()jcenter()}dependencies {// 这个和个人studio 配置有关根据情况改变classpath 'com.android.tools.build:gradle:3.2.0' // NOTE: Do not place your application dependencies here; they belong// in the individual module build.gradle files}}AI写代码
html

4.将拷贝的代码复制到新导入的jar 源码最外层 build.gradle 中(放置最下面即可)

5.执行 sync now

原文 https://blog.csdn.net/hj_key/article/details/89944549