BUILD FAILD with cordova and ionic


#1

I have cordova 8.0.0 and ionic 3.20.0.
I tried to build my project and I had a BUILD FAILD (some weeks ago all was good):

The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.

Incremental java compilation is an incubating feature.

The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild
UP-TO-DATE
:preReleaseBuild
UP-TO-DATE
:checkReleaseManifest

:preDebugBuild
UP-TO-DATE
:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild
UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies

:CordovaLib:compileDebugAidl

UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
UP-TO-DATE
:CordovaLib:copyDebugLint

UP-TO-DATE
:CordovaLib:mergeDebugShaders

UP-TO-DATE
:CordovaLib:compileDebugShaders

UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets

UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles

UP-TO-DATE
:CordovaLib:packageDebugRenderscript

UP-TO-DATE
:CordovaLib:compileDebugRenderscript
UP-TO-DATE

:CordovaLib:generateDebugResValues

UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources

UP-TO-DATE
:CordovaLib:processDebugManifest

UP-TO-DATE
:CordovaLib:generateDebugBuildConfig
UP-TO-DATE
:CordovaLib:processDebugResources

UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard

UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac

UP-TO-DATE
:CordovaLib:processDebugJavaRes

UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug

UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders

UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug

UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug

UP-TO-DATE
:CordovaLib:bundleDebug

UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:checkReleaseManifest

:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl
UP-TO-DATE

:CordovaLib:compileReleaseNdk

UP-TO-DATE
:CordovaLib:copyReleaseLint
UP-TO-DATE
:CordovaLib:mergeReleaseShaders

UP-TO-DATE
:CordovaLib:compileReleaseShaders

UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets
UP-TO-DATE

:CordovaLib:mergeReleaseProguardFiles
UP-TO-DATE

:CordovaLib:packageReleaseRenderscript
UP-TO-DATE

:CordovaLib:compileReleaseRenderscript
UP-TO-DATE

:CordovaLib:generateReleaseResValues

UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources
UP-TO-DATE

:CordovaLib:processReleaseManifest
UP-TO-DATE

:CordovaLib:generateReleaseBuildConfig

UP-TO-DATE
:CordovaLib:processReleaseResources
UP-TO-DATE

:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
UP-TO-DATE

:CordovaLib:compileReleaseJavaWithJavac
UP-TO-DATE

:CordovaLib:processReleaseJavaRes
UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForRelease
UP-TO-DATE

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
UP-TO-DATE

:CordovaLib:mergeReleaseJniLibFolders
UP-TO-DATE

:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
UP-TO-DATE

:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
UP-TO-DATE

:CordovaLib:bundleRelease

UP-TO-DATE
:prepareAndroidArchCoreRuntime110Library
UP-TO-DATE

:prepareAndroidArchLifecycleLivedataCore110Library
UP-TO-DATE

:prepareAndroidArchLifecycleRuntime110Library

UP-TO-DATE
:prepareAndroidArchLifecycleViewmodel110Library
UP-TO-DATE

:prepareComAndroidSupportAsynclayoutinflater2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportCoordinatorlayout2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportCursoradapter2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportCustomview2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportDocumentfile2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportDrawerlayout2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportInterpolator2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportLoader2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportLocalbroadcastmanager2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportPrint2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportSlidingpanelayout2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportSupportCompat2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportSupportCoreUi2800Alpha1Library
UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportSupportFragment2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportSupportMediaCompat2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportSupportV42800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportSwiperefreshlayout2800Alpha1Library
UP-TO-DATE

:prepareComAndroidSupportViewpager2800Alpha1Library
UP-TO-DATE

:prepareOrgApacheCordovaCordovaLib623ReleaseLibrary
UP-TO-DATE

:prepareReleaseDependencies
:compileReleaseAidl
UP-TO-DATE

:compileReleaseRenderscript
UP-TO-DATE

:generateReleaseBuildConfig
UP-TO-DATE

:generateReleaseResValues
UP-TO-DATE

:generateReleaseResources UP-TO-DATE
:mergeReleaseResources
UP-TO-DATE

:processReleaseManifest

UP-TO-DATE
:processReleaseResources
ERROR: In FontFamilyFont, unable to find attribute android:font
ERROR: In FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In FontFamilyFont, unable to find attribute android:fontWeight
ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex

FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 2 mins 21.934 secs

  • What went wrong:
    Execution failed for task ‘:processReleaseResources’.

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.
    (node:7572) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
    ERROR: In FontFamilyFont, unable to find attribute android:font
    ERROR: In FontFamilyFont, unable to find attribute android:fontStyle
    ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
    ERROR: In FontFamilyFont, unable to find attribute android:fontWeight
    ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processReleaseResources’.

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.
    at ChildProcess.whenDone (D:\project\ionic\Il Libro della Verita\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    (node:7572) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
    (node:7572) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

#2

For this error, see here: