4

我有一個項目,我混搭標準Android搖籃插件:在Android Studio 2.1.3中,實驗gradle不工作嗎?

apply plugin: 'com.android.library' 

與實驗搖籃插件爲庫:

apply plugin: 'com.android.model.library' 

在我的整體的build.gradle我有以下的依存關係:

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.google.gms:google-services:3.0.0' 
     classpath 'com.android.tools.build:gradle-experimental:0.7.2' 
     classpath 'com.android.tools.build:gradle:2.1.3' 
    } 
} 

現在經過升級至Android 2.1.3,我得到以下錯誤的搖籃同步之後:

Gradle sync failed: Gradle version 2.10 is required. Current version is >2.14.1. If using the gradle wrapper, try editing the distributionUrl in ?>blah blah blah

此時在.idea的Android Studio IDE的日誌我看到下列錯誤:

Caused by: org.gradle.api.internal.plugins.PluginApplicationException: >Failed to apply plugin [class >'com.android.build.gradle.model.AndroidComponentModelPlugin']

當我解決gradle-wrapper.properties文件我得到的搖籃同步後執行以下操作:

Error:Minimum supported Gradle version is 2.14.1. Current version is >2.10. If using the gradle wrapper, try editing the distributionUrl in >/Users/development/Desktop/android_msdk/xFAClient/Android/xFA/gradle/wrapp>er/gradle-wrapper.properties to gradle-2.14.1-all.zip

而且一遍又一遍......

我這裏不知道...

回答

4

的gradle升級到實驗0.7.3:

 classpath 'com.android.tools.build:gradle-experimental:0.7.3' 

它允許包裝的gradle 2.14.1兼容性。

+0

感謝Hrk,NDK的構建和實驗項目的工作。 – neuman8