Can't run ionic 3 app on device after ionic update


#1

Hello Everyone,
i’ve just updated my ionic version, and when i tried to run it on my real device with the ionic cordova run android --livereload the build fails for task processDebugRessources. i’ll put the hole running process below

PS C:\Users\Hamza\Desktop\ionic\MyApp> ionic cordova run android --livereload
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
--iscordovaserve --platform android --target cordova - Ctrl+C to cancel
[18:25:51]  watch started ...
[18:25:51]  build dev started ...
[18:25:51]  clean started ...
[18:25:51]  clean finished in 49 ms
[18:25:51]  copy started ...
[18:25:53]  deeplinks started ...
[18:25:53]  deeplinks finished in 89 ms
[18:25:53]  transpile started ...
[18:26:08]  transpile finished in 14.79 s
[18:26:08]  preprocess started ...
[18:26:08]  preprocess finished in 1 ms
[18:26:08]  webpack started ...
[18:26:17]  copy finished in 25.10 s
[18:26:26]  webpack finished in 18.03 s
[18:26:26]  sass started ...
[18:26:35]  autoprefixer: <css input>:31939:3: Gradient has outdated direction syntax. New syntax is like `to left`
            instead of `right`.
[18:26:35]  autoprefixer: <css input>:31979:3: Gradient has outdated direction syntax. New syntax is like `to left`
            instead of `right`.
[18:26:35]  autoprefixer: <css input>:32111:3: Gradient has outdated direction syntax. New syntax is like `to left`
            instead of `right`.
[18:26:35]  autoprefixer: <css input>:32392:3: Gradient has outdated direction syntax. New syntax is like `to left`
            instead of `right`.
[18:26:35]  autoprefixer: <css input>:32406:3: Gradient has outdated direction syntax. New syntax is like `to left`
            instead of `right`.
[18:26:35]  autoprefixer: <css input>:32439:3: Gradient has outdated direction syntax. New syntax is like `to left`
            instead of `right`.
[18:26:36]  sass finished in 9.85 s
[18:26:36]  postprocess started ...
[18:26:36]  postprocess finished in 189 ms
[18:26:36]  lint started ...
[18:26:40]  build dev finished in 49.23 s
[18:26:42]  watch ready in 51.02 s
[18:26:42]  dev server running: http://localhost:8100/

[OK] Development server running!
     Local: http://localhost:8100
     External: http://192.168.1.2:8100


> cordova run android
[18:27:06]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/article/article.ts, line: 1
            'ViewChild' is declared but never used.

       L1:  import { Component, ViewChild } from '@angular/core';
       L2:  import { IonicPage, NavController, NavParams, AlertController } from 'ionic-angular';

[18:27:06]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/list/list.ts, line: 1
            'ViewChild' is declared but never used.

       L1:  import { Component, ViewChild, ElementRef } from '@angular/core';
       L2:  import { NavController, NavParams, AlertController } from 'ionic-angular';

[18:27:06]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/list/list.ts, line: 1
            'ElementRef' is declared but never used.

       L1:  import { Component, ViewChild, ElementRef } from '@angular/core';
       L2:  import { NavController, NavParams, AlertController } from 'ionic-angular';

[18:27:06]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/games/games.ts, line: 2
            'IonicPage' is declared but never used.

       L1:  import { Component, ViewChild } from '@angular/core';
       L2:  import { IonicPage, NavController, Nav, Platform, AlertController } from 'ionic-angular';
       L3:  import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';

[18:27:06]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/games/games.ts, line: 4
            All imports are unused.

       L3:  import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
       L4:  import { LocalNotifications } from '@ionic-native/local-notifications';
       L5:  import { ServersProvider } from '../../providers/servers/servers';

[18:27:06]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/games/games.ts, line: 10
            All imports are unused.

       L9:  import { ListPage } from '../list/list';
      L10:  import { DateTime } from 'ionic-angular/components/datetime/datetime';

[18:27:06]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/news/news.ts, line: 4
            All imports are unused.

       L3:  import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
       L4:  import { LocalNotifications } from '@ionic-native/local-notifications';
       L5:  import { ServersProvider } from '../../providers/servers/servers';

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/login/login.ts, line: 4
            All imports are unused.

       L3:  import { Facebook, FacebookLoginResponse } from '@ionic-native/Facebook';
       L4:  import { LocalNotifications } from '@ionic-native/local-notifications';
       L5:  import { ServersProvider } from '../../providers/servers/servers';

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/home/home.ts, line: 33
            Property 'nativePageTransitions' is declared but never used.

      L32:  public datasource: DatasourceProvider,
      L33:  public nav: Nav, private nativePageTransitions: NativePageTransitions,
      L34:  private facebook: Facebook,

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/home/home.ts, line: 34
            Property 'facebook' is declared but never used.

      L33:  public nav: Nav, private nativePageTransitions: NativePageTransitions,
      L34:  private facebook: Facebook,
      L35:  private admobFree: AdMobFree) {

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/home/home.ts, line: 3
            'NativeTransitionOptions' is declared but never used.

       L2:  import { NavController, Nav, Platform, AlertController } from 'ionic-angular';
       L3:  import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
       L4:  import { LocalNotifications } from '@ionic-native/local-notifications';

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/home/home.ts, line: 4
            All imports are unused.

       L3:  import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
       L4:  import { LocalNotifications } from '@ionic-native/local-notifications';
       L5:  import { ServersProvider } from '../../providers/servers/servers';

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/pages/home/home.ts, line: 7
            'FacebookLoginResponse' is declared but never used.

       L6:  import { DatasourceProvider } from '../../providers/datasource/datasource';
       L7:  import { Facebook, FacebookLoginResponse } from '@ionic-native/Facebook';
       L8:  import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/app/app.component.ts, line: 73
            'fullName' is declared but never used.

      L72:  this.isLoggedIn = true;
      L73:  var fullName = profile.first_name+' '+profile.last_name;
      L74:  var email = profile.email;

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/app/app.component.ts, line: 74
            'email' is declared but never used.

      L73:  var fullName = profile.first_name+' '+profile.last_name;
      L74:  var email = profile.email;
      L75:  var picture = this.userData.picture;

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/app/app.component.ts, line: 75
            'picture' is declared but never used.

      L74:  var email = profile.email;
      L75:  var picture = this.userData.picture;
      L76:  this.userPicture = this.userData.picture;

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/app/app.component.ts, line: 1
            'enableProdMode' is declared but never used.

       L1:  import { Component, ViewChild, enableProdMode } from '@angular/core';
       L2:  import { Nav, Platform, AlertController } from 'ionic-angular';

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/app/app.component.ts, line: 6
            'AdMobFreeBannerConfig' is declared but never used.

       L5:  import { Facebook, FacebookLoginResponse } from '@ionic-native/Facebook';
       L6:  import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';

[18:27:07]  tslint: C:/Users/Hamza/Desktop/ionic/Wydad/src/app/app.component.ts, line: 15
            All imports are unused.

      L14:  import { PlayersPage } from '../pages/players/players';
      L15:  import { LoginPage } from '../pages/login/login';

[18:27:07]  lint finished in 30.90 s
ANDROID_HOME=C:\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_152
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

        at build_ev0gyrbmxtgnkrn2t8omx41do.run(C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\build.gradle:141)
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
:preDebugBuild
 UP-TO-DATE
:checkDebugManifest
:preReleaseBuild 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

:prepareComAndroidSupportAnimatedVectorDrawable2702Library
 UP-TO-DATE

:prepareComAndroidSupportAppcompatV72702Library
 UP-TO-DATE

:prepareComAndroidSupportAsynclayoutinflater2800Alpha1Library
 UP-TO-DATE

:prepareComAndroidSupportCardviewV72702Library
 UP-TO-DATE

:prepareComAndroidSupportCoordinatorlayout2800Alpha1Library
 UP-TO-DATE

:prepareComAndroidSupportCursoradapter2800Alpha1Library
 UP-TO-DATE

:prepareComAndroidSupportCustomtabs2702Library
 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
:prepareComAndroidSupportSupportVectorDrawable2702Library UP-TO-DATE
:prepareComAndroidSupportSwiperefreshlayout2800Alpha1Library
 UP-TO-DATE

:prepareComAndroidSupportViewpager2800Alpha1Library
 UP-TO-DATE

:prepareComFacebookAndroidFacebookAndroidSdk4310Library
 UP-TO-DATE

:prepareComFacebookAndroidFacebookApplinks4310Library
 UP-TO-DATE

:prepareComFacebookAndroidFacebookCommon4310Library
 UP-TO-DATE

:prepareComFacebookAndroidFacebookCore4310Library

UP-TO-DATE
:prepareComFacebookAndroidFacebookLogin4310Library

UP-TO-DATE
:prepareComFacebookAndroidFacebookMessenger4310Library
 UP-TO-DATE

:prepareComFacebookAndroidFacebookPlaces4310Library

UP-TO-DATE
:prepareComFacebookAndroidFacebookShare4310Library
 UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesAds1104Library
 UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesAdsLite1104Library
 UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesBase1104Library
 UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesBasement1104Library
 UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesClearcut1104Library
 UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesGass1104Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesSafetynet1104Library
 UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasks1104Library UP-TO-DATE
:prepareOrgApacheCordovaCordovaLib630DebugLibrary
 UP-TO-DATE

:prepareDebugDependencies
:compileDebugAidl
 UP-TO-DATE

:compileDebugRenderscript
 UP-TO-DATE

:generateDebugBuildConfig
 UP-TO-DATE
:generateDebugResValues

UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources

:processDebugManifest
 UP-TO-DATE

:processDebugResources
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
 FAILED

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex



BUILD FAILED

Total time: 1 mins 29.123 secs
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.
Error: cmd: Command failed with exit code 1 Error output:
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex


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.

[ERROR] An error occurred while running cordova run android (exit code 1).

#2

What exactly did you update and how?
What is your ionic info output?


#3

when i executed the command, i got a message saying if i want to updgrade my ionic version so i accepted, here’s my ionic info output

cli packages: (C:\Users\Hamza\AppData\Roaming\npm\node_modules)
    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:
    cordova (Cordova CLI) : 7.1.0

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

System:
    Android SDK Tools : 25.2.5
    Node              : v8.9.1
    npm               : 5.5.1
    OS                : Windows 10

Environment Variables:
    ANDROID_HOME : C:\Android\android-sdk

Misc:
    backend : pro

#4

Ok, then you updated your Ionic CLI.

Your Cordova tooling seems to be out of date, which might be causing all kinds of problems.
You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins here: https://ionic.zone/cordova/update


#5

I followed the instructions and now i have this problem

:app:processDebugManifest
C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\app\src\main\AndroidManifest.xml:28:5-74 Error:


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

:app:processDebugManifest FAILED
        uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
        Suggestion: use a compatible library with a minSdk of at most 16,
                or increase this project's minSdk version to at least 19,
                or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
        Suggestion: use a compatible library with a minSdk of at most 16,
                or increase this project's minSdk version to at least 19,
                or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

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

20 actionable tasks: 20 executed
* Get more help at https://help.gradle.org

BUILD FAILED in 7m 45s
Error: cmd: Command failed with exit code 1 Error output:
C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\app\src\main\AndroidManifest.xml:28:5-74 Error:
        uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
        Suggestion: use a compatible library with a minSdk of at most 16,
                or increase this project's minSdk version to at least 19,
                or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
        Suggestion: use a compatible library with a minSdk of at most 16,
                or increase this project's minSdk version to at least 19,
                or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

* 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 7m 45s

[ERROR] An error occurred while running cordova run android (exit code 1).

#6

You probably have minSdk=16 in your config.xml - fix that as the error message says.


#7

the problem has gotten even bigger …

:app:processDebugResources
C:\Users\Hamza\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\ddb941c2532c9072fb20dd2b974d5a47\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.


C:\Users\Hamza\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\ddb941c2532c9072fb20dd2b974d5a47\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/ttcIndex not found.

C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:260: error: resource android:attr/fontVariationSettings not found.
C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:260: 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)

        at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)

        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)

        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)

        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)

        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)

        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)

        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)

        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)

        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)

        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)

        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
        at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
        at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
        ... 48 more
Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
        at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
        at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        ... 1 more

Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:463)

        at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:415)
        at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
        at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)



FAILURE: Build failed with an exception.

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

* Get more help at https://help.gradle.org

25 actionable tasks: 1 executed, 24 up-to-date
BUILD FAILED in 1m 17s
Error: cmd: Command failed with exit code 1 Error output:
C:\Users\Hamza\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\ddb941c2532c9072fb20dd2b974d5a47\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.

C:\Users\Hamza\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\ddb941c2532c9072fb20dd2b974d5a47\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/ttcIndex not found.

C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:260: error: resource android:attr/fontVariationSettings not found.
C:\Users\Hamza\Desktop\ionic\Wydad\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:260: 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)
        at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
        at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
        at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
        ... 48 more
Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
        at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
        at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        ... 1 more
Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:463)
        at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:415)
        at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
        at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)

FAILURE: Build failed with an exception.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 17s

[ERROR] An error occurred while running cordova run android (exit code 1).


#8

Is ionic cordova requirements happy?
Does it work with a new project created with ionic start?


#9

Java jdk, android sdk and gradle are installed and yes new projets are deploying just fine on my phone !!


#10

trying change -> com.android.support:support-+ to com.android.support:support-v4:27.1.0 or latest version i have its problem yesterday. xD


#11

where do i do that ?


#12

platforms->android->projects.properties

review if yours cordova plugins too in plugin.xml if its call android.support and change it.


#13

that’s what i found on projects.properties

target=android-27
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.google.android.gms:play-services-base:11.0.4
cordova.system.library.2=com.google.android.gms:play-services-ads:11.0.4
cordova.system.library.3=com.facebook.android:facebook-android-sdk:4.+
cordova.system.library.4=com.android.support:support-v4:+

#14

cordova.system.library.4=com.android.support:support-v4:+
to
cordova.system.library.4=com.android.support:support-v4:27.1.0 in my case


#15

nope i still got the same message as above …


#16

Did you check the facebook plugin.xml? maybe you should do the same in this


#17

i don’t have the plugin.xml file


#18

root{
node_modules
platforms
plugins
{
here cordova plugins check plugins.xml -> search this com.android.support:support
}
}


#19

node_modules does not belong to you. You should never directly edit anything underneath it. You can use npm link to effect local modifications if necessary, but the ultimate best solution is to raise an issue with the maintainers of the module, so that everybody can benefit.


#20

I was with this same problem, so I did what you advised and it worked here, in config.xml I changed it to minSdk=19 now work fine thanks