error: resource android:attr/fontVariationSettings resource android:attr/ttcIndex not found.

本文介绍了解决Ionic项目中构建Android应用时遇到的问题。通过在指定文件中设置com.android.support:support-v4的具体版本号来避免依赖冲突。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

当我运行ionic build android时,出现以下问题。 
这里写图片描述

解决这个问题如下:

  • 查找和替换 com.android.support:support-v4: com.android.support:support-v4:27.1.0 在platform/android目录里。
  • 将下面代码添加到platforms/android/app/build.gradle 和 platforms/android/build.gradle 文件里。

    configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-v4:27.1.0'
    }}
    • 1
    • 2
    • 3
    • 4

    Edited to answer “Where is this com.android.support:support-v4:+ setting ?” …

The setting will probably(in this case) be in one of your plugin’s .gradle file in the platform/android/ directory, for example in my case it was the starter-barcodescanner plugin so just go through all your plugins .gradle files : 

这里写图片描述

转自:https://blog.youkuaiyun.com/wumama123/article/details/79493190

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值