Android问题集锦之三十一

最后更新于:2022-04-01 06:39:08

## Android Studio: Plugin with id 'android-library' not found github上的很多项目都是用Android Studio开发的,昨天下载一个项目已经好久了,gradle的版本比较低,所以就遇到找不到‘android-library’的错误。从stackoverflow上找到类似的问题,解决方法是用较新的gradle版本。 ~~~ Instruct Gradle to download Android plugin from Maven Central repository. You do it by pasting the following code at the beginning of the Gradle build file: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.0.+' } } Replace version string 1.0.+ with the latest version. Released versions of Gradle plugin can be found in official Maven Repository or on MVNRepository artifact search. ~~~ com.android.tools.build gradle 1.1.3 all (62) 07-Mar-2015 pom jar javadoc.jar sources.jar > 参考:  > [http://stackoverflow.com/questions/18153739/android-studio-plugin-with-id-android-library-not-found](http://stackoverflow.com/questions/18153739/android-studio-plugin-with-id-android-library-not-found)  > [http://search.maven.org/#search|ga|1|g:%22com.android.tools.build%22%20AND%20a:%22gradle%22](http://search.maven.org/#search|ga|1|g:%22com.android.tools.build%22%20AND%20a:%22gradle%22)
';