找不到酒店'VERSION_CODE'

Art*_*tem 4 android gradle

我想将这个库用于我的项目,当我尝试从Github 打开这个库(FloatingActionButton)源时出错.

当我尝试打开源代码来理解它时,我下载为zip这个项目,我收到了这个错误:

Error:(10, 0) Could not find property 'VERSION_CODE' on project ':library'.
Run Code Online (Sandbox Code Playgroud)

添加build.gradle

apply plugin: 'com.android.library'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 22
        versionCode Integer.parseInt(project.VERSION_CODE)
        versionName project.VERSION_NAME
    }
    buildTypes {
        release {
            minifyEnabled false
            debuggable false
        }

        debug {
            minifyEnabled false
            debuggable true
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

apply from: '../gradle-mvn-push.gradle'
Run Code Online (Sandbox Code Playgroud)

Vik*_*nin 5

导入库作为模块,更改versionCodeversionName随机值,添加对项目的引用 - 添加到依赖项 compile project(":library") 并删除:

申请自:'../gradle-mvn-push.gradle'