当前位置: 代码迷 >> 综合 >> Ionic 运行报错No resource identifier found for attribute 'appComponentFactory' in package 'android'
  详细解决方案

Ionic 运行报错No resource identifier found for attribute 'appComponentFactory' in package 'android'

热度:34   发布时间:2023-12-23 01:15:51.0

今天用Ionic命令打包项目时候出现报错

打包命令:ionic cordova build android --prod --release

打包报错:No resource identifier found for attribute 'appComponentFactory' in package 'android'

解决方法: 
在项目级别的build.gradle(./platforms/android/build.gradle) 的allprojects节点下面加上以下代码

configurations.all {resolutionStrategy.force 'com.android.support:support-v4:24.0.0'
}

 

  相关解决方案