android studio引入github第三方工程出现assembleRelease无法识别

apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"

defaultConfig {
    applicationId "cn.feng.skin.demo"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {

    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

}

}

dependencies {

compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile project(':android-skin-loader-lib')

}

final def TARGET_SKIN_DIR = '../skin-package/'
final def SAMPLE_NAME = 'Sample.apk'
assembleRelease.doLast {
println("=====================assembleRelease.doLast.begin.=========================")

def dir = new File(TARGET_SKIN_DIR)
if (!dir.exists()) {
    dir.mkdirs()
}

def f = new File(TARGET_SKIN_DIR + SAMPLE_NAME)
if (f.exists()) {
    f.delete()
}

copy {
    from('build/outputs/apk')
    into(TARGET_SKIN_DIR)
    include '*.apk'
    exclude '**/*-unaligned.apk'
    rename ('android-skin-loader-sample-release.apk', SAMPLE_NAME)
}

println("=====================assembleRelease.doLast success.=========================")

}

assembleDebug.doLast {
println("=====================assembleDebug.doLast.begin.=========================")

def dir = new File(TARGET_SKIN_DIR)
if (!dir.exists()) {
    dir.mkdirs()
}

def f = new File(TARGET_SKIN_DIR + SAMPLE_NAME)
if (f.exists()) {
    f.delete()
}

copy {
    from('build/outputs/apk')
    into(TARGET_SKIN_DIR)
    include '*.apk'
    exclude '**/*-unaligned.apk'
    rename ('android-skin-loader-sample-debug.apk', SAMPLE_NAME)
}

println("=====================assembleDebug.doLast success.=========================")

}

Error:(32, 0) Could not get unknown property 'assembleRelease' for project ':android-skin-loader-sample' of type org.gradle.api.Project.

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问