1

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

android { compileSdkVersion 23 buildToolsVersion "23.0.0"

defaultConfig {
    applicationId "com.xxxxx.xx.xx.xx.xxxxx"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"


    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
            multiDexEnabled true
        }

        dexOptions {
            javaMaxHeapSize "2g"
        }
    }
}

}

依赖项 { testCompile 'junit:junit:4.12' testCompile 'org.robolectric:robolectric:3.0'

compile files('libs/DTBSCommon.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.squareup.dagger:dagger-compiler:1.2.1'
compile 'com.android.support:design:23.1.1'
compile 'org.java-websocket:Java-WebSocket:1.3.0'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.fasterxml.jackson.core:jackson-core:2.0.6'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.0.6'
compile 'com.fasterxml.jackson.core:jackson-databind:2.0.6'
compile 'com.android.support:support-v4:23.1.1'
compile 'de.hdodenhof:circleimageview:2.0.0'

}

4

1 回答 1

0

此错误是由于您的构建工具版本和 compileSDKVersion 造成的。

这是一个解决方法。

首先从 SDK Manager 下载并安装所有可用的更新。然后创建一个新项目。当您在当前应用程序中使用 google play 服务插件时,请将 google play 服务插件应用于新创建的项目。

现在比较两个应用程序的 build.gradle(Module App) 并在旧项目 build.gradle(module app) 中进行更改。还将各种依赖项更新到最新版本。进行更改后同步 gradle,它应该像魅力一样工作。

于 2016-11-08T08:49:00.107 回答