这是我在Android Studio上的第一次尝试.我安装了0.8.0并更新到0.8.2.创建项目后,我收到错误消息:
错误:(1,0)找不到ID为'com.android.application'的插件
C:\用户\鲍勃\ AndroidStudioProjects\HelloAgain6 \程序\的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.bob.helloagain6"
minSdkVersion 15
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
Run Code Online (Sandbox Code Playgroud)
和C:\ Users\Bob\AndroidStudioProjects\HelloAgain6\build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
// NOTE: Do not place your …Run Code Online (Sandbox Code Playgroud) 我将我的 android studio 从 Android studio Fox 更新为 Android studio Bumblebee 2021.1.1 但我的项目都无法在Android studio Bumblebee 2021.1.1中运行。我最终得到了这个美丽的错误。

这是我的 gradle 文件
plugins {
id 'com.android.application' version '7.1.0' apply false
id 'com.android.library' version '7.1.0' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud) java android android-studio mobile-development android-update-app
自从我将项目升级到Android Gradle Plugin 7.1.3 后,我无法再构建它。
错误:
在以下任何来源中均未找到插件 [id: 'com.android.application', version: '7.1.3', apply: false]:
尝试:使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。
例外是:org.gradle.api.plugins.UnknownPluginException:在以下任何来源中均未找到插件 [id:'com.android.application',版本:'7.1.3',apply:false]:
- Gradle 核心插件(插件不在“org.gradle”命名空间中)
- 插件存储库(无法解析插件工件'com.android.application:com.android.application.gradle.plugin:7.1.3')在以下存储库中搜索:Gradle Central Plugin Repository Google MavenRepo
构建.gradle:
plugins {
id 'com.android.application' version '7.1.3' apply false
id 'com.android.library' version '7.1.3' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
设置.gradle:
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google() …Run Code Online (Sandbox Code Playgroud) 我已经升级了 Android Studio,之后我遇到了这个错误:
Gradle sync failed: Plugin [id: 'com.android.application', version: '7.1.2', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.1.2')
Searched in the following repositories:
Gradle Central Plugin Repository
Google
MavenRepo (24 s 586 ms)
Run Code Online (Sandbox Code Playgroud)
我已将 JDK 升级到 11,但没有修复该错误。我还可以做些什么?