I cannot build my appication

Hi, please help me. I cannot generate a build/apk for my app, the error log is:

brulao@brulao-notebook:~/Documentos/workspaces/ionic/calculaIMC$ ionic cordova build android
The Ionic CLI has an update available (3.20.0 => 4.10.3)!

[WARN] No write permissions for global node_modules--automatic CLI updates are 

       disabled.
       To fix, see https://docs.npmjs.com/getting-started/fixing-npm-permissions
       
       Or, install the CLI update manually:
       
       npm i -g ionic@latest
       

Running app-scripts build: --platform android --target cordova
[21:18:12]  build dev started ... 
[21:18:12]  clean started ... 
[21:18:12]  clean finished in 70 ms 
[21:18:12]  copy started ... 
[21:18:12]  deeplinks started ... 
[21:18:12]  deeplinks finished in 42 ms 
[21:18:12]  transpile started ... 
[21:18:27]  transpile finished in 14.35 s 
[21:18:27]  preprocess started ... 
[21:18:27]  preprocess finished in less than 1 ms 
[21:18:27]  webpack started ... 
[21:18:27]  copy finished in 15.29 s 
[21:18:32]  webpack finished in 5.07 s 
[21:18:32]  sass started ... 
[21:18:34]  sass finished in 2.14 s 
[21:18:34]  postprocess started ... 
[21:18:34]  postprocess finished in 6 ms 
[21:18:34]  lint started ... 
[21:18:34]  build dev finished in 22.36 s 
> cordova build android
Android Studio project detected

[21:18:37]  lint finished in 2.82 s 
ANDROID_HOME=/opt/android/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-oracle
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


FAILURE: Build failed with an exception.

* Where:
Build file '/home/brulao/Documentos/workspaces/ionic/calculaIMC/platforms/android/CordovaLib/build.gradle' line: 41

* What went wrong:
A problem occurred evaluating project ':CordovaLib'.

> Failed to apply plugin [id 'com.android.library']
   > 
Minimum supported Gradle version is 4.10.1. Current version is 4.1. If using the gradle wrapper, try editing the distributionUrl in /home/brulao/Documentos/workspaces/ionic/calculaIMC/gradle/wrapper/gradle-wrapper.properties to gradle-4.10.1-all.zip


* 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 10s
(node:2132) UnhandledPromiseRejectionWarning: Error: /home/brulao/Documentos/workspaces/ionic/calculaIMC/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* Where:
Build file '/home/brulao/Documentos/workspaces/ionic/calculaIMC/platforms/android/CordovaLib/build.gradle' line: 41

* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> Failed to apply plugin [id 'com.android.library']
   > Minimum supported Gradle version is 4.10.1. Current version is 4.1. If using the gradle wrapper, try editing the distributionUrl in /home/brulao/Documentos/workspaces/ionic/calculaIMC/gradle/wrapper/gradle-wrapper.properties to gradle-4.10.1-all.zip

* 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 10s
    at ChildProcess.whenDone (/home/brulao/Documentos/workspaces/ionic/calculaIMC/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
(node:2132) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2132) [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.

brulao@brulao-notebook:~/Documentos/workspaces/ionic/calculaIMC$ ^C