Execution failed for task ': CordovaLib: processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt

I am learning how to use Ionic while running a test application, but I had this problem for two days. I was looking for possible solutions, but no one worked for me.

The problem occurs when I want to test the application on my Android phone. Using this command ionic cordova run androidgives me the following error

FAILURE: assembly failure with exception.

Something went wrong:

Execution failed for task ': CordovaLib: processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt command

[ERROR] An error occurred while starting the android runova (exit code 1).

I'm not sure what happened. My application is very simple based on the Ionic template ionic start myApp tabs, and I am using the Ionic native Geolocation plugin .

It works for me ionic infoand returns it

cli packages:
    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0
global packages:
    cordova (Cordova CLI) : 7.1.0
local packages:
    @ionic/app-scripts : 3.1.4
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

I also checked the Cordova white paper for Android development , and my paths for Java and Android are fine.

Also with ionic cordova requirementseverything looks fine.

Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25,android-23
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-4.1\bin\gradle

Thanks for any help.

+4
source share
3 answers

How I solved this problem:

1) npm remove cord ionic

2) npm install -g cordova@7.0.0 ionic@3.19.0

3) Cordoba rm android platform

4) add android cordova platform

0
source

compat. , (, 1.2.0) cordova-android@6.3.0

cordova rm cordova-plugin-compat --force

cordova cordova-plugin-compat@1.2.0

rm android

android@6.3.0

. :)

0

Inside the android folder in the platforms folder there is a file called project.properties Try replacing + with 27.1.0 in the lines below

cordova.system.library.1=com.android.support:support-v4:+
cordova.system.library.2=com.android.support:appcompat-v7:+

Also do the same in the build.gradle file

"com.android.support:support-v4:+"
"com.android.support:appcompat-v7:+"
0
source

Source: https://habr.com/ru/post/1690453/


All Articles