Android Studio 2.2 and Jack are getting blocked by Avira Antivirus

南笙酒味 提交于 2019-12-18 07:34:14

问题


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
     }
}

My 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

回答1:


While compiling disable real-time protection in your anti-virus package. It is the only workaround that is reliable at this time.




回答2:


You could add your Android SDK, Android Studio and project folders to your antivirus whitelist. This way you will still be protected while building.

Guide here.




回答3:


Fixed using 'com.android.tools.build:gradle:2.2.0-alpha5'

if not working than please add your Android SDK, Android Studio and project folders to your antivirus whitelist:

Guide



来源:https://stackoverflow.com/questions/39851050/android-studio-2-2-and-jack-are-getting-blocked-by-avira-antivirus

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!