找不到 com.android.tools.build:gradle:4.3.3
Could not find com.android.tools.build:gradle:4.3.3
错误:
Could not find com.android.tools.build:gradle:4.3.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.3.3/gradle-4.3.3.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.3.3/gradle-4.3.3.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.3.3/gradle-4.3.3.pom
Required by:
project :
build.gradle(项目):
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.3.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle(应用程序):
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.example.blogger"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
这是在尝试连接到 fire base 时。(将 Firebase 添加到您的 Android 应用)
https://console.firebase.google.com
请帮助我下载了 google-services.json 并同步了它,但出现了这个错误。
android gradle 插件 的版本 4.3.3
不存在。
使用:
classpath "com.android.tools.build:gradle:4.0.1"
不要将它与google播放服务插件混淆:
classpath 'com.google.gms:google-services:4.3.3'
您尝试的版本不存在。
您可以在下面的 link 中选择可用的替代版本。
如果您使用的是 Android Studio 4.2(在我的例子中是 Beta 3)并且它是一个 react-native 项目,它不会指向 gradle 文件损坏的 gradle 参考,因此您可能需要重新安装 node_modules 以防万一您不小心更改了它。
错误:
Could not find com.android.tools.build:gradle:4.3.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.3.3/gradle-4.3.3.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.3.3/gradle-4.3.3.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.3.3/gradle-4.3.3.pom
Required by:
project :
build.gradle(项目):
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.3.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle(应用程序):
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.example.blogger"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
这是在尝试连接到 fire base 时。(将 Firebase 添加到您的 Android 应用) https://console.firebase.google.com
请帮助我下载了 google-services.json 并同步了它,但出现了这个错误。
android gradle 插件 的版本 4.3.3
不存在。
使用:
classpath "com.android.tools.build:gradle:4.0.1"
不要将它与google播放服务插件混淆:
classpath 'com.google.gms:google-services:4.3.3'
您尝试的版本不存在。
您可以在下面的 link 中选择可用的替代版本。
如果您使用的是 Android Studio 4.2(在我的例子中是 Beta 3)并且它是一个 react-native 项目,它不会指向 gradle 文件损坏的 gradle 参考,因此您可能需要重新安装 node_modules 以防万一您不小心更改了它。