应用插件:com。Android应用程序“apply plugin:”com。谷歌。gms。谷歌服务
android{编译DK23版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.roblectric:roblectric: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'
}
此错误是由于生成工具版本和CompileSDK版本造成的。
这里有一个工作台。
首先,从SDK Manager下载并安装所有可用更新。然后创建一个新项目。当您在当前应用程序中使用google play services插件时,请将google play services插件应用于新创建的项目。
现在比较一下构建。gradle(模块应用程序),并在旧项目构建中对进行更改。gradle(模块应用程序)。还将各种依赖项更新为其最新版本。在进行更改后,同步渐变,它应该像魅力一样工作。