问题描述
所以我更新了我的项目以使用新的 jack 编译器,但由于某种未知原因,我的 AntiVir 阻止了任务 transformClassesWithPreJackPackagedLibrariesForDebug
如果我禁用 AntiVir 实时保护,它会起作用.我真的不想那样做,也不想开始将我的 android 项目放在例外列表中.
我正在使用 Android Studio 2.2,这是我的 build.gradle
So I update my project to use the new jack compiler, but for some unknown reason my AntiVir blocks the task transformClassesWithPreJackPackagedLibrariesForDebug
It works if I disable AntiVir real-time protection. I really don't want to do that and I don't want to start putting my android project in the exception list.
I am using Android Studio 2.2 and this is my build.gradle
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
minSdkVersion 21
targetSdkVersion 24
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
我的project.gradle
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
}
当我尝试在我的硬件设备上运行应用程序时出现的错误.
And the error when I try to run the app on my hardware device.
Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'.
> Failed to delete temporary file C:\Users\User\AppData\Local\Temp\jill-1475579265083-0.jack
推荐答案
编译时禁用防病毒包中的实时保护.这是目前唯一可靠的解决方法.
While compiling disable real-time protection in your anti-virus package. It is the only workaround that is reliable at this time.
这篇关于Android Studio 2.2 和 Jack 被 Avira Antivirus 阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!