当前位置: 首页 > 知识库问答 >
问题:

当我运行我的旧android项目时,我从build.gradle得到一条错误消息

漆雕和昶
2023-03-14

当我运行旧的android项目时,我得到一条错误消息:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27

    defaultConfig {
        applicationId "com.example.android.firebaseupload"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    allprojects {
        repositories {
            jcenter()
            maven {
                url 'https://maven.google.com'
            }
        }
    }

        dependencies {

            implementation fileTree(include: ['*.jar'], dir: 'libs')
            androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
                exclude group: 'com.android.support', module: 'support-annotations'
            })


            implementation 'com.android.support.constraint:constraint-layout:1.1.3'
            implementation 'com.android.support:appcompat-v7:27.0.+'
            implementation 'com.google.firebase:firebase-storage:17.0.0'
            implementation 'com.google.firebase:firebase-auth:17.0.0'
            implementation 'com.google.firebase:firebase-database:17.0.0'
            implementation 'com.github.gcacace:signature-pad:1.2.1'
            implementation 'com.squareup.picasso:picasso:2.5.0'
            implementation 'com.github.bumptech.glide:glide:3.7.0'
            implementation 'com.android.support:recyclerview-v7:27.0.0'
            implementation 'com.android.support:cardview-v7:27.0.0'
            implementation 'com.firebaseui:firebase-ui-database:0.4.0'
            implementation 'com.android.support:design:27.0.0'
            implementation 'com.android.support:support-v4:27.0.0'
            implementation 'com.google.android.gms:play-services-plus:17.0.0'
            testImplementation 'junit:junit:4.12'
        }





}

应用插件:'com.google.gms.google-services'

“警告:配置”编译“已过时,已被”实现“和”API“所取代。将于2018年底删除。有关详细信息,请参阅:http://d.android.com/r/tools/update-dependency-configurations.html受影响的模块:app”

共有1个答案

方宏富
2023-03-14

尝试添加

apply plugin: 'com.google.gms.google-services'

在你的分级文件的第二行

 类似资料: