2016-11-08 24 views
1

應用插件:「com.android.application」 應用插件:「com.google.gms.google服務」插件太舊,請更新到最新版本,或者設置ANDROID_DAILY_OVERRIDE envrinment變量

機器人{ 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' 

}

+0

任何人幫助我.. –

回答

0

這個錯誤是由於您的構建工具版本和compileSDKVersion。

這是一個工作方式。

首先從SDK Manager下載並安裝所有可用更新。 然後創建一個新項目。當您在當前應用中使用Google Play服務插件時,請將Google Play服務插件應用於新創建的項目。

現在比較兩個應用程序的build.gradle(Module App),並在您的舊項目build.gradle(模塊應用程序)中進行更改。還將各種依賴關係更新爲最新版本。在更改同步gradle後,它應該像魅力一樣工作。

+0

供您參考最新版本: compileSdkVersion 25 buildToolsVersion 「25.0.0」 –

+0

編譯 'com.android.support:appcompat-v7:25.0.0' –

+0

編譯「com.android .support.constraint:constraint-layout:1.0.0-beta3' compile'c​​om.android.support:design:25.0.0' compile'c​​om.android.support:support-v4:25.0.0' compile' de.hdodenhof:circleimageview:2.1.0' –

相關問題