Quand je cours
ionic cordova build Android --prod
il montre des erreurs ci-dessous:
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute Android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute Android:ttcIndex
FAILED
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.
BUILD FAILED
Total time: 9.11 secs
Error: /Users/cqismgis/Desktop/MobileGIS/platforms/Android/gradlew: Command failed with exit code 1 Error output:
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
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.
et dans AndroidStudio, je clique sur le bouton 'Construire', il montre:
Error:In <declare-styleable> FontFamilyFont, unable to find attribute Android:fontVariationSettings
Error:Execution failed for task ':processDebugResources'.
> com.Android.ide.common.process.ProcessException: Failed to execute aapt
Je ne sais pas comment le réparer, dites-moi s'il vous plaît les détails des étapes de réparation.
Pour résoudre cela:
you_app_folder/plugin et recherchez plugin.xml dans tous les plugins
Allez dans votre dossier de plugin, cherchez dans ce répertoire:
com.Android.support:support-v4:+
et
com.Android.support:support-v4:24.1.1+
Changez-le avec:
com.Android.support:support-v4:27.1.0
ensuite
Aussi, j'ai exécuté
ionic cordova platform remove Android
et
ionic cordova platform add Android