2017-05-15 4 views
0

Dies ist das Buildskript, das von einem Android-Client verwendet wird, der auf der MifosX-Plattform für die mifos-Benutzergemeinschaft erstellt wurde.Android Studio Gradle-Buildskript funktioniert nicht

/* 
* This project is licensed under the open source MPL V2. 
* See https://github.com/openMF/android-client/blob/master/LICENSE.md 
*/ 

buildscript { 
    repositories { 
     mavenCentral() 
     maven { url 'https://maven.fabric.io/public' } 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.3' 
     classpath 'io.fabric.tools:gradle:1.+' 
     classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' 
     classpath 'com.github.triplet.gradle:play-publisher:1.1.4' 
    } 
} 

repositories { 
    mavenCentral() 
    maven { url 'https://maven.fabric.io/public' } 
    jcenter() 
    maven { url "https://jitpack.io" } 
    maven { url 'http://dl.bintray.com/amulyakhare/maven' } 
} 
.... 
apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 
apply from: '../config/quality/quality.gradle' 
apply plugin: 'com.neenbedankt.android-apt' 
apply plugin: 'com.github.triplet.play' 

.... 
dependencies { 
    // You must install or update the Support Repository through the SDK manager to use this dependency. 
    compile fileTree(include: ['*.jar'], dir: 'src/main/libs') 
    //DBFlow dependencies 
    apt "com.github.Raizlabs.DBFlow:dbflow-processor:$rootProject.raizLabsDBFlow" compile "com.github.Raizlabs.DBFlow:dbflow-core:$rootProject.raizLabsDBFlow" compile "com.github.Raizlabs.DBFlow:dbflow:$rootProject.raizLabsDBFlow" 
    // App's Support dependencies, including test 
    compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion" compile "com.android.support:support-v4:$rootProject.supportLibraryVersion" compile "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion" compile "com.android.support:cardview-v7:$rootProject.supportLibraryVersion" compile "com.android.support:design:$rootProject.supportLibraryVersion" compile "com.google.android.gms:play-services-places:$rootProject.playServicesVersion" compile "com.google.android.gms:play-services-location:$rootProject.playServicesVersion" compile "com.google.android.gms:play-services-maps:$rootProject.playServicesVersion" compile "com.google.maps.android:android-maps-utils:$rootProject.mapUtilsServices" compile "com.android.support.test.espresso:espresso-idling-resource:$rootProject.espressoVersion" 
    //Dagger dependencies 
    apt "com.google.dagger:dagger-compiler:$rootProject.daggerVersion" compile "com.google.dagger:dagger:$rootProject.daggerVersion" provided 'javax.annotation:jsr250-api:1.0' 
    //Required by Dagger2 
    //Butter Knife 
    compile "com.jakewharton:butterknife:$rootProject.butterKnifeVersion" apt "com.jakewharton:butterknife-compiler:$rootProject.butterKnifeVersion" 
    //Square dependencies 
    compile("com.squareup.retrofit2:retrofit:$rootProject.retrofitVersionLatest") { 
     // exclude Retrofit’s OkHttp peer-dependency module and define your own module import 
     exclude module: 'okhttp' 
    } 
    compile "com.squareup.retrofit2:converter-gson:$rootProject.retrofitVersionLatest" compile "com.squareup.retrofit2:converter-scalars:$rootProject.retrofitVersionLatest" compile "com.squareup.retrofit2:adapter-rxjava:$rootProject.retrofitVersionLatest" compile "com.squareup.okhttp3:okhttp:$rootProject.okHttp3Version" compile "com.squareup.okhttp3:logging-interceptor:$rootProject.okHttp3Version" compile "com.jakewharton.fliptables:fliptables:$rootProject.flipTableVersion" compile 'javax.annotation:jsr250-api:[email protected]' 
    compile 'io.reactivex:rxandroid:1.1.0' 
    compile 'io.reactivex:rxjava:1.1.4' 
    compile 'com.facebook.stetho:stetho:1.3.1' 
    compile 'com.facebook.stetho:stetho-okhttp3:1.3.1' 
    compile 'com.joanzapata.iconify:android-iconify-material:2.1.1' 
    // (v2.0.0) 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true; 
    } 
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' 
    compile 'com.github.bumptech.glide:glide:3.7.0' 
    // Android Testing Support Library's runner and rules 
    androidTestCompile "com.android.support.test:runner:$rootProject.runnerVersion" androidTestCompile "com.android.support.test:rules:$rootProject.rulesVersion" 
    // Espresso UI Testing dependencies. 
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' 
    androidTestCompile("com.android.support.test.espresso:espresso-contrib:$rootProject.espressoVersion") { 
     exclude group: 'com.android.support', module: 'appcompat' 
     exclude group: 'com.android.support', module: 'support-v4' 
     exclude group: 'com.android.support', module: 'recyclerview-v7' 
     exclude group: 'com.android.support', module: 'design' 
    } 
    androidTestCompile "com.android.support.test.espresso:espresso-intents:$rootProject.espressoVersion" testCompile 'junit:junit:4.12' 
    testCompile 'org.mockito:mockito-core:1.10.19' 
} 

Allerdings, wenn ich dieses Skript bauen bekomme ich diesen Fehler:

Error:(135, 1) A problem occurred evaluating project ':mifosng-android'. 
> Could not find method compile() for arguments [com.github.Raizlabs.DBFlow:dbflow-core:3.1.1] on DefaultExternalModuleDependency{group='com.github.Raizlabs.DBFlow', name='dbflow-processor', version='3.1.1', configuration='default'} of type org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency. 

I Android Studio bin mit 2.1.1.

Bitte helfen Sie mir.

Antwort

0

hinzufügen oberhalb dieser Linie Abhängigkeiten

def raizLabsDBFlow= "4.0.1"

+0

die Versionsnummer bereits im Projekt breite Build-Skript definiert ist, – Lema

Verwandte Themen