构建错误:错误:任务':app:compileLightningLiteDebugKotlin'执行失败。 >编译错误

时间:2017-07-20 20:17:09

标签: android android-studio kotlin

我刚刚玩了Lightening Browser并重新编写了包名, 我想知道错误是怎么来的,早些时候我认为它可能有一些版本依赖。请帮我解决这个问题。

是什么让我遇到这个问题,我早些时候却意外地解决了这个问题。所以,请帮助我做这个问题的POC我尝试了其他答案。但它没有用。 当我构建项目而不重构它时,它起作用了。但是为什么在重命名包或重构之后它不起作用。

  

构建错误:错误:任务执行失败   ':应用程序:compileLightningLiteDebugKotlin&#39 ;. >编译错误。

因此,共享我的build.gradle文件。

项目级Build.gradle文件

Module:app level Gradle 
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.getkeepsafe.dexcount'

android {
    compileSdkVersion project.targetSdkVersion
    buildToolsVersion project.buildToolsVersion

    defaultConfig {
        minSdkVersion project.minSdkVersion
        targetSdkVersion project.targetSdkVersion
        versionName project.versionName
        vectorDrawables.useSupportLibrary = true
    }

    sourceSets {
        lightningPlus.setRoot('src/LightningPlus')
        lightningLite.setRoot('src/LightningLite')
    }

    buildTypes {
        debug {
            minifyEnabled false
            shrinkResources false
            proguardFiles 'proguard-project.txt'
        }

        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles 'proguard-project.txt'
        }
    }

    productFlavors {
        lightningPlus {
            buildConfigField "boolean", "FULL_VERSION", "Boolean.parseBoolean(\"true\")"
            applicationId "acr.browser.lightning"
            versionCode project.versionCode_plus
        }

        lightningLite {
            buildConfigField "boolean", "FULL_VERSION", "Boolean.parseBoolean(\"false\")"
            applicationId "acr.browser.barebones"
            versionCode project.versionCode_lite
        }
    }

    lintOptions {
        abortOnError true
    }

    packagingOptions {
        exclude '.readme'
    }
}

dexcount {
    includeClasses = false
    includeFieldCount = false
    format = "tree"
    orderByMethodCount = true
    verbose = false
}

dependencies {
    testCompile 'junit:junit:4.12'

    // support libraries
    def supportLibVersion = '25.4.0'
    compile "com.android.support:palette-v7:$supportLibVersion"
    compile "com.android.support:appcompat-v7:$supportLibVersion"
    compile "com.android.support:design:$supportLibVersion"
    compile "com.android.support:recyclerview-v7:$supportLibVersion"
    compile "com.android.support:support-v4:$supportLibVersion"

    // html parsing for reading mode
    compile 'org.jsoup:jsoup:1.10.2'

    // dependency injection
    def daggerVersion = '2.11'
    compile "com.google.dagger:dagger:$daggerVersion"
    annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
    provided 'javax.annotation:jsr250-api:1.0'

    // view binding
    def butterknifeVersion = '8.6.0'
    compile "com.jakewharton:butterknife:$butterknifeVersion"
    annotationProcessor "com.jakewharton:butterknife-compiler:$butterknifeVersion"

    // permissions
    compile 'com.anthonycr.grant:permissions:1.1.2'

    // proxy support
    compile 'net.i2p.android:client:0.8'

    compile 'com.squareup.okhttp3:okhttp:3.8.0'

    // tor proxy
    def netcipherVersion = '2.0.0-alpha1'
    compile "info.guardianproject.netcipher:netcipher:$netcipherVersion"
    compile "info.guardianproject.netcipher:netcipher-webkit:$netcipherVersion"

    compile 'com.anthonycr.bonsai:bonsai:1.1.0'

    compile 'com.anthonycr.progress:animated-progress:1.0'

    // memory leak analysis
    def leakCanaryVersion = '1.5.1'
    debugCompile "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
    releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"

    // Kotlin
    compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}

0 个答案:

没有答案