在模块上的中间文件夹中找不到文件:Project Build失败并显示错误

时间:2017-06-10 16:46:17

标签: android android-studio gradle android-gradle apk

当我从Build>构建我的项目时重建项目,它失败并出现以下错误。

enter image description here

我在项目中使用的两个模块都出现上述错误。

此外,当我尝试生成已签名的APK时,它表示APK已成功生成,但输出中没有生成APK文件夹。

建议我做出改变以消除此错误。

编辑1:下面是项目主要模块的build.gradle:

apply plugin: 'com.android.application'


android {
    compileSdkVersion 23
    buildToolsVersion '25.0.0'
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId "com.washkart.activities"
        minSdkVersion 15
        targetSdkVersion 19

        // Enabling multidex support.
        multiDexEnabled true
    }

    lintOptions {
        abortOnError false
    }

    signingConfigs {
        release {
            storeFile file("washkart.jks")
            storePassword System.getenv("KSTOREPWD")
            keyAlias "wk"
            keyPassword System.getenv("KEYPWD")
            v2SigningEnabled false
        }
    }

    repositories {
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }



    buildTypes {
        release {
            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
            signingConfig signingConfigs.release
        }
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }


    dataBinding {
        enabled = true
    }
}

dependencies {
//    compile files('libs/PGSDK_v1.0.1.jar')
//    compile files('libs/joda-time-2.4.jar')
    compile 'com.google.android.gms:play-services:10.0.1'
    compile 'com.google.android.gms:play-services-maps:10.0.1'
    compile 'com.google.android.gms:play-services-plus:10.0.1'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:support-v4:23.1.1'
    //    compile 'com.android.support:appcompat-v7:21.+'
    compile 'com.google.android.gms:play-services-ads:10.0.1'
    compile 'com.google.android.gms:play-services-identity:10.0.1'
    compile 'com.google.android.gms:play-services-location:10.0.1'
    compile 'com.google.android.gms:play-services-gcm:10.0.1'
    compile 'com.facebook.android:facebook-android-sdk:4.6.0'
    compile 'com.google.android.gms:play-services-analytics:10.0.1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
    compile project(':acra-acra-4.8.1')
//    compile project(':acra')
    compile fileTree(include: ['*.jar'], dir: 'libs')
}
//configurations {
//    all*.exclude group: 'com.android.support', module: 'support-v4'
//}
//apply plugin: 'com.google.gms.google-services'

以下是无法找到文件的模块的build.gradle。

apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.0'

    lintOptions {
        abortOnError false
    }

    defaultConfig {
        minSdkVersion 4
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

    lintOptions {
        abortOnError false
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'src/main/proguard/proguard.cfg'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:23.1.1'
}

0 个答案:

没有答案