Div*_*dri 3 java android gradle firebase build.gradle
错误 :
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 :
Run Code Online (Sandbox Code Playgroud)
构建.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
}
Run Code Online (Sandbox Code Playgroud)
构建.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'
}
Run Code Online (Sandbox Code Playgroud)
这是在尝试连接到 firebase 时。(将 Firebase 添加到您的 Android 应用程序) https://console.firebase.google.com
请帮助我已经下载了 google-services.json 并同步了它,但它给出了这个错误。
4.3.3android gradle 插件的版本不存在。
使用:
classpath "com.android.tools.build:gradle:4.0.1"
Run Code Online (Sandbox Code Playgroud)
不要将它与 google play services 插件混淆:
classpath 'com.google.gms:google-services:4.3.3'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3610 次 |
| 最近记录: |