Cordova Android: Can't build with API 26+

#1

I have an application in Ionic 3 (migrated from Ionic 2)

I can build the Android version until API 25. If I try using API 26+ I get the following error:

aapt: Syntax Error: “(” unexpected

Some ideas?

#2

What is your ionic info output?

#3

@ionic/cli-utils: 1.19.2
Ionic: 3.20.0
cordova: 8.0.0

@ionic/app-scripts: 3.1.7
Cordova platforms: android 6.1.2
Ionic Framework: ionic-angular 3.9.2

#4

Your Cordova tooling seems to be out of date, which might be causing all kinds of problems.
You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins here: https://ionic.zone/cordova/update

1 Like
#5

I realized that the issue was caused by this, but now I am having another dependency problems =’(

android 7 is somehow causing bugs

#6

Open a new topic and describe your problem.

#7

After so many things, same error.

Actual Ionic Info:

ionic (Ionic CLI) : 4.0.5
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0

System:

Android SDK Tools : 26.1.1
NodeJS : v6.9.2 (/usr/bin/nodejs)
npm : 3.10.9
OS : Linux 3.16

Environment:

ANDROID_HOME : /home/tom/Android/Sdk

#8

This is still not the most recent version.

#9

FInally dit it!

I had to:

Reinstall node
Reinstall ionic
Reinstall cordova
Reinstall platform android
Reinstall jdk
Reinstalll gradle
Reinstall Android Studio
Reinstall Sdk
Reinstall all modules after deleting node_modules

:sweat_smile::sweat_smile::sweat_smile::sweat_smile::sweat_smile:

But now it works