错误:(18,0)无法在null对象上调用方法mavenLocal()

时间:2017-01-08 10:59:52

标签: java android android-gradle

目标:

  

我正在将aviary sdk整合到我现有的Android应用程序中我跟着文件frm link1 link2

     

如我所做的文档所述,但我得到此错误   错误:(18,0)无法在空对象

上调用方法mavenLocal()      

任何人都可以帮我解决这个问题

的gradle:应用

    apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
repositories {
    mavenCentral()
    jcenter()
    mavenLocal()
    maven {
        name 'maven.aviary.com'
        url uri("http://maven.aviary.com/repo/release")
    }
}

android {
    compileSdkVersion 25
    buildToolsVersion "24.0.3"
    defaultConfig {
        applicationId "com.example.altu.mysignature"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    /* 3) Exclude duplicate licenses */
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/DEPENDENCIES'
        pickFirst 'AndroidManifest.xml'
    }
}



dependencies {
    compile 'com.adobe.creativesdk.foundation:auth:0.9.1186'
    compile 'com.aviary.android.feather.sdk:aviary-sdk:3.6.3'
    compile 'gun0912.ted:tedpermission:1.0.2'
    compile 'gun0912.ted:tedbottompicker:1.0.3'
    compile 'com.android.support:appcompat-v7:25.+'
    testCompile 'junit:junit:4.12'
    compile 'com.github.gcacace:signature-pad:1.2.0'
    debugCompile 'com.github.rtugeek:ColorSeekBar:1.1.2'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.google.android.gms:play-services:10.0.1'
    compile 'com.google.android.gms:play-services-ads:10.0.1'
}

applicationnamne.gradle

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
        classpath 'com.google.gms:google-services:3.0.0'
        classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }mavenLocal()
    maven {
        name 'maven.aviary.com'
        url uri("http://maven.aviary.com/repo/release")
    }
    maven {
        url 'https://repo.adobe.com/nexus/content/repositories/releases/'
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

1 个答案:

答案 0 :(得分:0)

您的错误在这里:

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }mavenLocal()    <--

您必须删除 },因为它会关闭repositories