Build error caused by gradle: buildOutputCleanup/

In my first build of android, I encountered build error. Error message is in below.

FAILURE: Build failed with an exception.

 * What went wrong:
Timeout waiting to lock Build Output Cleanup Cache (/path/to/my/app/platforms/android/.gradle/buildOutputCleanup). It is currently in use by another Gradle instance.

Owner PID: unknown
Our PID: 16022
Owner Operation: unknown

Our operation:
Lock file: /path/to/my/app/platforms/android/.gradle/buildOutputCleanup/

I killed the process and deleted all *.lock file and build several times, but I encountered same error. Please advice to me.

ionic info

cli packages: (/Users/***/.nodebrew/node/v8.10.0/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2


    Android SDK Tools : 25.2.5
    Node              : v8.10.0
    npm               : 5.6.0
    OS                : macOS High Sierra
    Xcode             : Xcode 9.3 Build version 9E145

Environment Variables:

    ANDROID_HOME : /Users/***/Library/Android/sdk


    backend : pro

I resolved this problem by myself.It is caused by the path of my project.
I encountered this problem when I place it in sd card.
I copied it to home and tried to build, and it went well.

I am facing this issue. My project is in SD Card where as Android SDK & Gradle are in Macintosh HD under my user Name.

Did you moved the project folder to HD under your username Home directory? What Exactly you did?..
Thanks in advance.