Building error

hello everyone,please i just installed ionic on my new pc(ubuntu 16.04 LTS) and i’m having the following errors when trying to build my project:

ANDROID_HOME=/opt/sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Subproject Path: CordovaLib
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_cnvaww14wt0ezvfv0nuo54w41.run(/home/vicsoft/IonicProject/myApp/platforms/android/build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild

UP-TO-DATE

:preDebugBuild

UP-TO-DATE

:checkDebugManifest

:CordovaLib:preBuild

UP-TO-DATE

:CordovaLib:preDebugBuild

UP-TO-DATE

:CordovaLib:checkDebugManifest

:CordovaLib:prepareDebugDependencies

:CordovaLib:compileDebugAidl

:CordovaLib:compileDebugNdk

UP-TO-DATE

:CordovaLib:compileLint

UP-TO-DATE

:CordovaLib:copyDebugLint

UP-TO-DATE

:CordovaLib:mergeDebugShaders

UP-TO-DATE

:CordovaLib:compileDebugShaders

:CordovaLib:generateDebugAssets

:CordovaLib:mergeDebugAssets

UP-TO-DATE

:CordovaLib:mergeDebugProguardFiles

UP-TO-DATE

:CordovaLib:packageDebugRenderscript

UP-TO-DATE

:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources

:CordovaLib:processDebugManifest
UP-TO-DATE

:CordovaLib:generateDebugBuildConfig

UP-TO-DATE

:CordovaLib:processDebugResources
/opt/sdk/build-tools/27.0.3/aapt: 1: /opt/sdk/build-tools/27.0.3/aapt: Syntax error: "(" unexpected


FAILED

FAILURE:
Build failed with an exception.


* What went wrong:

Execution failed for task ':CordovaLib:processDebugResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt


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

BUILD FAILED

Total time: 1.583 secs
[10:58:23]  lint finished in 2.79 s
(node:6025) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /home/vicsoft/IonicProject/myApp/platforms/android/gradlew: Command failed with exit code 1 Error output:
/opt/sdk/build-tools/27.0.3/aapt: 1: /opt/sdk/build-tools/27.0.3/aapt: Syntax error: "(" unexpected


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
(node:6025) [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.

What is your ionic info output?
What does ionic cordova requirements return?

ionic info returned

cli packages: (/home/vicsoft/IonicProject/Epharm/node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 2.0.2
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.5.3

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.4
    npm               : 5.6.0 
    OS                : Linux 4.10

Environment Variables:

    ANDROID_HOME : /opt/sdk

Misc:

    backend : pro

ionic cordova requirements returned

> cordova requirements
Android Studio project detected


Requirements check results for android:

Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26,android-25,android-24,android-19,android-18,android-17
Gradle: installed /usr/share/gradle/bin/gradle

This is pretty old and should be upgraded.

Did you install Android Studio?
Did you install a standalone Gradle?

Does it work if you create a new app with ionic start?

i installed android studio and standalone Gradle… and it didn’t work when i created new app with ionic start