Denny Mathew
Denny Mathew

Reputation: 853

Your anti-virus program might be impacting your build performance. Android Studio checked the following directories:

Your anti-virus program might be impacting your build performance. Android Studio checked the following directories:

 C:\Users\user.name\.AndroidStudio3.5\system
 C:\Users\user.name\Documents\app-new-code  
 C:\Users\user.name\AppData\Local\Android\Sdk
 C:\Users\user.name\.gradle

Can anyone help me, how to get this disable this setting or increase the performance of android studio? I am using android studio version 3.5.

Upvotes: 6

Views: 8332

Answers (2)

Bertram Gilfoyle
Bertram Gilfoyle

Reputation: 10235

Cause

While Android Studio build process is in action, it create a lot of intermediate files in order to compile and package source code and resources. Enabling real time scanning in antivirus softwares will force it to scan all these newly created files for vulnerabilities. This is may interfere with the Android Studio build process, causing builds to run dramatically slower.


Fix

Exclude real-time scanning on these directories.

Gradle cache
%USERPROFILE%\.gradle

Android Studio projects
%USERPROFILE%\AndroidStudioProjects

Android SDK
%USERPROFILE%\AppData\Local\Android\SDK

Android Studio system files
C:\Program Files\Android\Android Studio\system

This is how you can accomplish the same in different antivirus softwares.
Windows Defender
Kaspersky
AVG Antivirus

Note: You can also disable the disable real-time scanning completely. This method isn't recommenced since it will open security risks.

Upvotes: 5

Amjad Alwareh
Amjad Alwareh

Reputation: 3281

You should exclude this dir from antivirus in your machine.

  1. Open Windows Defender Security Center.
  2. Select Virus & threat protection > Virus & threat protection settings > Add or remove exclusions.
  3. Under Add an exclusion, select folder

Upvotes: 16

Related Questions