导入模块/ wonderkiln / CameraKit-Android错误

时间:2017-11-24 20:20:03

标签: android importerror

我从github下载了zip文件并解压缩,将其作为模块导入,并在依赖项选项卡中添加了模块。我从gradle得到这个错误,我无法弄明白。有人可以帮我解决这个错误吗?

  

错误:(53,0)找不到参数的方法install()   项目[build_87et7s4cmy6abwmgqnhf5ksb8 $ _run_closure3 @ 64ec1996]   ':camerakit'类型为org.gradle.api.Project。

这是我的camerakit / build.gradle文件内容,它给出了错误:

apply plugin: 'com.android.library'
def ver = '0.12.1'
def isSnapshot(version) {
    return version.contains('-Snapshot') || System.getenv('CIRCLE_TAG') == null || System.getenv('CIRCLE_TAG').length() == 0
}
group = 'com.wonderkiln'
version = ver
android {
    compileSdkVersion 27
    buildToolsVersion '27.0.0'
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 27
        versionName ver
    }
    lintOptions {
        abortOnError false
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main.java.srcDirs += 'src/main/base'
        main.java.srcDirs += 'src/main/api16'
        main.java.srcDirs += 'src/main/api21'
        main.java.srcDirs += 'src/main/types'
        main.java.srcDirs += 'src/main/events'
        main.java.srcDirs += 'src/main/utils'
    }
    externalNativeBuild {
        cmake {
            path 'src/main/cpp/CMakeLists.txt'
        }
    }
}
dependencies {
    compile 'com.android.support:appcompat-v7:27.0.0'
    compile 'com.android.support:exifinterface:27.0.0'
    implementation 'android.arch.lifecycle:runtime:1.0.0'
    implementation 'android.arch.lifecycle:extensions:1.0.0-beta1'
    annotationProcessor 'android.arch.lifecycle:compiler:1.0.0-beta1'
}
install {
    repositories.mavenInstaller {
        pom.project {
            name 'CameraKit-Android'
            packaging 'aar'
        }
    }
}
bintray {
    user = System.getenv('BINTRAY_USER')
    key = System.getenv('BINTRAY_KEY')
    override = isSnapshot(ver)
    publish = true
    configurations = ['archives']
    pkg {
        repo = isSnapshot(ver) ? 'snapshots' : 'maven'
        name = 'CameraKit-Android'
        userOrg = 'wonderkiln'
        vcsUrl = 'https://github.com/wonderkiln/CameraKit-Android.git'
        version {
            name = ver
            vcsTag = ver
            released = new Date()
        }
    }
}

1 个答案:

答案 0 :(得分:1)

从gradle文件中删除install和bintray JSON对象,然后重试。