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

时间:2019-07-06 11:52:10

标签: android android-studio android-gradle

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

“警告:配置'compile'已过时,并已由'implementation'和'api'代替。 它将于2018年底删除。有关更多信息,请参阅:http://d.android.com/r/tools/update-dependency-configurations.html 受影响的模块:应用程序”

我尝试在所有项目中使用google(),但收到相同的错误消息。

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”

“警告:配置'compile'已过时,并已由'implementation'和'api'代替。 它将于2018年底删除。有关更多信息,请参阅:http://d.android.com/r/tools/update-dependency-configurations.html 受影响的模块:应用程序”

2 个答案:

答案 0 :(得分:0)

问题似乎出在:

implementation 'com.github.gcacace:signature-pad:1.2.1'

查看此链接

[https://github.com/gcacace/android-signaturepad/blob/master/SignaturePad-Example/build.gradle][1]

看起来开发人员已经有一段时间没有更新其代码了,因此您的解决方案是:

1-将https://github.com/gcacace/android-signaturepad下载为zip

2-在应用模块中打开其Gradle文件,并将编译替换为实现

3-确保不再有Compile关键字后,转到Android Studio中的Android项目。单击文件->新建->导入模块->选择提取项目并对其进行编辑的文件夹,就是这样

  • 确保所有依赖项都使用最新版本

答案 1 :(得分:0)

尝试添加

data:
  someValue: {{ .Values.someValue | b64enc }}
{{- if .Values.theSecret }}
  theSecret: {{ .Values.theSecret | b64enc }}
{{- end }}

gradle文件第二行

相关问题