错误:任务':app:compileReleaseJavaWithJavac'的执行失败。 >

时间:2017-01-26 03:11:51

标签: android android-studio android-proguard

enter image description here

我在一个项目中有3个Android应用,如上所示。我有一个名为“mylibs”的库,供所有应用程序使用。我想为app,app2和app3生成一个已签名的APK(使用ProGuard)。所以我去构建> 生成签名APK ..然后

  

构建APK时的错误

消息显示如下:

enter image description here

Gradle app:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.biocryptodisk.bookconverter"
    minSdkVersion 19
    targetSdkVersion 23
    versionCode 1
    versionName '1.0'
    testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
productFlavors {
}
}

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'
})
compile 'com.android.support:support-v4:23.4.0'
testCompile 'junit:junit:4.12'
compile project(':mylibs')
}

Gradle app2:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.biocryptodisk.app2"
    minSdkVersion 19
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

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

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

}

Gradle app3:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
    applicationId "com.biocryptodisk.uniqreader"
    minSdkVersion 19
    targetSdkVersion 23
    versionCode 1
    versionName '1.0'
    testInstrumentationRunner     'android.support.test.runner.AndroidJUnitRunner'
}
buildTypes {

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

dependencies {
compile 'com.android.support:support-v4:23.4.0'
compile files('libs/epublib-core-latest.jar')
compile files('libs/slf4j-android-1.6.1-RC1.jar')
compile project(':mylibs')
compile 'com.google.android.gms:play-services-appindexing:8.4.0'
}

Gradle mylibs:

apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    minSdkVersion 19
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

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

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

上面提到的AESCBC256Crypt和其他类都来自mylibs。我在这里做错了什么?

0 个答案:

没有答案