2
android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.****"
        minSdkVersion 21
        targetSdkVersion 25
        versionCode 30
        versionName "1.0"
        multiDexEnabled true

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        signingConfig signingConfigs.config
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

repositories {
    maven { url "https://dl.bintray.com/hani-momanii/maven" }
    mavenCentral()

    jcenter()
    maven { url "https://jitpack.io" }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'

    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.google.android.gms:play-services-maps:9.6.1'
    compile 'com.google.android.gms:play-services-location:9.6.1'
    compile 'com.android.support:support-vector-drawable:25.0.0'
    compile 'hani.momanii.supernova_emoji_library:supernova-emoji-library:0.0.2'
    compile 'com.google.maps.android:android-maps-utils:0.5'
    compile 'com.googlecode.libphonenumber:libphonenumber:7.0.4'
    compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
    compile 'com.theartofdev.edmodo:android-image-cropper:2.2.0'
    compile 'com.facebook.android:facebook-android-sdk:4.+'
    compile 'org.fusesource.mqtt-client:mqtt-client:1.12'
    compile 'com.google.firebase:firebase-messaging:9.6.1'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.android.support.test.espresso:espresso-core:2.2.2'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

我想使用minifyEnabled true并尝试生成签名的 Apk 但出现错误

警告:处理任务时出现异常 java.io.FileNotFoundException: \app\build\intermediates\proguard-rules\release\aapt_rules.txt(系统找不到指定的路径)。

我应该怎么做才能避免这个错误?

4

2 回答 2

2

构建清洁项目。转到 Android Studio -> 文件 -> 使缓存无效/重新启动

于 2018-05-15T09:33:02.037 回答
0

Android Studio "Build" - "Clean project" 并且错误消息不应再次出现。

于 2018-01-27T15:22:29.663 回答