Fix AAPT: Error retrieving parent for item:

Hello there,

I have a problem when try update to new version ionic, here my version


global packages:

    @ionic/cli-utils : 1.3.0
    Cordova CLI      : 7.0.1 
    Ionic CLI        : 3.3.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.3.0
    @ionic/cli-plugin-ionic-angular : 1.3.0
    Cordova Platforms               : android 6.2.3
    Ionic Framework                 : ionic-angular 3.3.0

System:

    Node       : v8.0.0
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.2 Build version 8E2002 
    ios-deploy : 1.9.1 
    ios-sim    : 5.0.13 

When I try to running cordova emulate android or ionic cordova emulate android will get a error like below:

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

BUILD FAILED

Total time: 26.907 secs
Error: /Users/phanbook/github/mobile/app.lackky/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/phanbook/github/mobile/app.lackky/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
    
/Users/phanbook/github/mobile/app.lackky/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
    
/Users/phanbook/github/mobile/app.lackky/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/Users/phanbook/github/mobile/app.lackky/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.



FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':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.

I have searching on google but no thing result. Could you explain detail this problems

Thanks

I don’t recognize that error, but just so you know: I reverted to the previous CLI because there were some bugs that interfered with my ability to compile. The next app-scripts is supposed to address these. So I’m using Ionic framework 3.x, but only using Ionic CLI 2.2.3, and my build process is much more stable.

Thanks your answers I will try to research back to old version :slight_smile:

In my case, this error caused by plugin cordova-plugin-filepath with version 1.1.0. To get it work again, I have to remove and add specific version 1.0.2.

It’s better if “ionic info” command list out all plugins currently used in app, and much better is to identify current state of each plugin may cause problem to deployment process.