File Opener build error Android

Ionic Info:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages: @ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.1.0 ios 4.5.4 Ionic Framework : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
Node              : v8.10.0
npm               : 5.6.0
OS                : macOS High Sierra
Xcode             : Xcode 9.2 Build version 9C40b

Environment Variables:

ANDROID_HOME : /Users/usuario/Library/Android/sdk

Misc:

backend : legacy

Error:
Users/usuario/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/9ca0692fe2632808b383d2ab4563a8a8/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

/Users/usuario/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/9ca0692fe2632808b383d2ab4563a8a8/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/ttcIndex not found.

/Users/usuario/Proyectos/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:86: error: resource android:attr/fontVariationSettings not found.
/Users/usuario/Projectos/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:86: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt

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

    at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)

    at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)

    at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
3 Likes

@cgarciaGp Replace <framework src="com.android.support:support-v4:+" /> to <framework src="com.android.support:support-v4:24.1.1+" /> line no 34 in plugin.xml of cordova.plugins.fileOpener2. and remove android platform ionic cordova platform rm android and then add again ionic cordova platform add android. now it should work

7 Likes

thats worked.Thanks ajaysaini

This worked for me but in my case, I have to remove the file-opener plugin first and then add it back again.

if you remove plugin then changes which is done into plugin.xml file, also removed