Ionic 3 build error

Hello guys,
I’ve been working with Ionic 3 for building a hybrid inter-platform application. I’m facing some issues while building application for android (not tested with ios). New to the android stuff and could’nt figure out what kind of error is that!! Browsed all over, no solution !!! Looking for help , Thanks in advance…!

These are my logs


ozone@ThinkPad-X230:~/Documents/falconCli_Su$ ionic cordova build android --verbose
[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: '/home/ozone/Documents/falconCli_Su', local: false, binPath:
        '/usr/local/lib/node_modules/ionic/bin/ionic', libPath: '/usr/local/lib/node_modules/ionic/dist/index.js' }
[DEBUG] Daemon found (pid: 4207)
Running app-scripts build: --platform android --target cordova
[22:05:04]  build dev started ...
[22:05:04]  clean started ...
[22:05:04]  clean finished in 31 ms
[22:05:04]  copy started ...
[22:05:05]  deeplinks started ...
[22:05:05]  deeplinks finished in 82 ms
[22:05:05]  transpile started ...
[22:05:11]  transpile finished in 5.91 s
[22:05:11]  preprocess started ...
[22:05:11]  preprocess finished in less than 1 ms
[22:05:11]  webpack started ...
[22:05:11]  copy finished in 6.57 s
[22:05:19]  webpack finished in 8.07 s
[22:05:19]  sass started ...
[22:05:21]  sass finished in 2.15 s
[22:05:21]  postprocess started ...
[22:05:21]  postprocess finished in 576 ms
[22:05:21]  lint started ...
[22:05:22]  build dev finished in 17.54 s
> cordova build android
[22:05:49]  lint finished in 27.28 s
Android Studio project detected

ANDROID_HOME=/usr/lib/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
studio
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Unable to create new analytics settings: /home/ozone/.android/analytics.settings (Permission denied)

publishNonDefault is deprecated and has no effect anymore. All variants are now published.

Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

        at build_3a6zzpu442snq44hdjtd862i.run(/home/ozone/Documents/falconCli_Su/platforms/android/app/build.gradle:145)

:CordovaLib:preBuild UP-TO-DATE

:CordovaLib:preDebugBuild
 UP-TO-DATE
:CordovaLib:compileDebugAidl

UP-TO-DATE

:CordovaLib:compileDebugRenderscript
 UP-TO-DATE
:CordovaLib:checkDebugManifest

UP-TO-DATE

:CordovaLib:generateDebugBuildConfig

UP-TO-DATE
:CordovaLib:prepareLintJar

UP-TO-DATE

:CordovaLib:generateDebugResValues

UP-TO-DATE

:CordovaLib:generateDebugResources

UP-TO-DATE

:CordovaLib:packageDebugResources

UP-TO-DATE

:CordovaLib:platformAttrExtractor

UP-TO-DATE
:CordovaLib:processDebugManifest
 UP-TO-DATE
:CordovaLib:processDebugResources
 UP-TO-DATE
:CordovaLib:generateDebugSources
 UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE

:CordovaLib:compileDebugJavaWithJavac
 UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
 UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
 UP-TO-DATE
:app:compileDebugAidl
 UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript
 UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig
 UP-TO-DATE
:app:prepareLintJar
 UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
 UP-TO-DATE
:app:createDebugCompatibleScreenManifests
 UP-TO-DATE
:app:processDebugManifest
 UP-TO-DATE
:app:splitsDiscoveryTaskDebug

UP-TO-DATE
:app:processDebugResources
 UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:javaPreCompileDebug
 UP-TO-DATE
:app:compileDebugJavaWithJavac
 UP-TO-DATE

:app:compileDebugNdk
 NO-SOURCE
:app:compileDebugSources UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets
 UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders
 UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
 UP-TO-DATE
:app:extractTryWithResourcesSupportJarDebug UP-TO-DATE
:app:transformClassesWithStackFramesFixerForDebug
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithStackFramesFixerForDebug'.
>
com.android.build.api.transform.TransformException: java.io.UncheckedIOException: java.nio.file.AccessDeniedException: /home/ozone/.android/build-cache.lock

* Try:
Run with --stacktrace
 option to get the stack trace. Run with --info or --debug
 option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 26s

35 actionable tasks: 1 executed, 34 up-to-date
(node:6236) UnhandledPromiseRejectionWarning: Error: /home/ozone/Documents/falconCli_Su/platforms/android/gradlew: Commandfailed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithStackFramesFixerForDebug'.
> com.android.build.api.transform.TransformException: java.io.UncheckedIOException: java.nio.file.AccessDeniedException: /home/ozone/.android/build-cache.lock

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 26s
    at ChildProcess.whenDone (/home/ozone/Documents/falconCli_Su/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at ChildProcess.emit (events.js:160:13)
    at maybeClose (internal/child_process.js:943:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
(node:6236) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing insideof an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6236) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Plugins that are used ,

ozone@ThinkPad-X230:~/Documents/falconCli_Su$ ionic cordova plugin
> cordova plugin ls
com.googlemaps.ios 2.5.0 "Google Maps SDK for iOS"
cordova-plugin-advanced-http 1.10.0 "Advanced HTTP plugin"
cordova-plugin-badge 0.8.7 "Badge"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-enable-multidex 0.1.0 "Enable Multidex"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.2.3 "cordova-plugin-googlemaps"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

build.gradle

/* Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
*/

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
    dependencies {

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.android.tools.build:gradle:3.0.0'
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
    //This replaces project.properties w.r.t. build settings
    project.ext {
      defaultBuildToolsVersion="25.0.2" //String
      defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
      defaultTargetSdkVersion=26 //Integer - We ALWAYS target the latest by default
      defaultCompileSdkVersion=26 //Integer - We ALWAYS compile with the latest by default
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
sudo chmod 0777 /home/ozone/.android/build-cache.lock