gpt4 book ai didi

gradle - Android Studio : Plugin with id 'android-library' not found

转载 作者:行者123 更新时间:2023-12-02 09:03:55 25 4
gpt4 key购买 nike

我一直在尝试让 ActionBarSherlock 正常工作,但遇到了一些问题。我在尝试构建它时遇到的一个问题是以下消息:

Plugin with id 'android-library' not found

具体:

D:\Projects\Android\actionbarsherlock>D:\Projects\Android\gradlew --info build
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file
'D:\Projects\Android\actionbarsherlock\build.gradle'.
Included projects: [root project 'actionbarsherlock']
Evaluating root project 'actionbarsherlock' using build file
'D:\Projects\Android\actionbarsherlock\build.gradle'.

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\Projects\Android\actionbarsherlock\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating root project 'actionbarsherlock'.
> Plugin with id 'android-library' not found.

我将其视为单独线程中的 ABS 问题,因此我很好奇如何解决以下一般问题:

Plugin with id 'android-library' not found

这是 build.gradle:

apply plugin: 'android-library'

dependencies {
compile 'com.android.support:support-v4:18.0.+'
}

android {
compileSdkVersion 14
buildToolsVersion '17.0.0'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}

你能帮忙吗?

最佳答案

指示 Gradle 从 Maven 中央存储库下载 Android 插件。

您可以通过将以下代码粘贴到 Gradle 构建文件的开头来完成此操作:

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.1'
}
}

将版本字符串 1.0.+ 替换为最新版本。 Gradle 插件的发布版本可以在 official Maven Repository 中找到。或点击MVNRepository artifact search .

关于gradle - Android Studio : Plugin with id 'android-library' not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18153739/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com