0

Couple days ago I did a ionic platform remove android and ionic plaform add android in order to check my progress in a certain feature in my code, and after I tried that I no longer can build an apk.

That does not make any sense to me since I didn't change another thing.

First error I was receiving said:

:processDebugManifest/Users/larissaarruda/Documents/mycode/platforms/android/AndroidManifest.xml:22:18-86 Error:
    Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86
    is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-60:19 to override.


See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

:processDebugManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86
    is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-60:19 to override.

* 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 2s

I tried this solution cordova plugin add cordova-android-support-gradle-release --fetch but it did not help me, only changed error message to

/Users/larissaarruda/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/0b39dfc9f8ccfbd308d18fae8fdbf5ed/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
    
/Users/larissaarruda/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/0b39dfc9f8ccfbd308d18fae8fdbf5ed/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.
    
/Users/larissaarruda/Documents/mycode/platforms/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:138: error: resource android:attr/fontVariationSettings not found.
/Users/larissaarruda/Documents/mycode/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:138: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt

I also tried cleaning gradle cache by removing .gradle/caches and after I tried build the app again, it came up with same error Failed to execute aapt.

Here's my $ ionic info output:

Your system information:

Cordova CLI: 7.0.1
Gulp version:  CLI version 2.0.1
Gulp local:   Local version 3.9.1
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.0
Ionic App Lib Version: 0.3.2
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X Yosemite
Node Version: v6.11.1
Xcode version: Not installed
lsilva
  • 147
  • 2
  • 17

0 Answers0