When I run
ionic cordova build android --prod
it shows errors below:
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.
and in AndroidStudio, I clikc 'Build' button, it shows:
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
I don't know how to fix it, please tell me the detail of fix steps.
To solve that :
you_app_folder/plugin and look for plugin.xml in all the plugins
Go to your plugin folder, search in that directory for :
com.android.support:support-v4:+
OR
com.android.support:support-v4:24.1.1+
OR
com.android.support:appcompat-v7:28.0.0
Change it with :
com.android.support:support-v4:27.1.0
OR
com.android.support:appcompat-v7:27.1.1
then
Also, I executed
ionic cordova platform remove android
and
ionic cordova platform add android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With