当前位置: 首页 > 知识库问答 >
问题:

运行“Cordova build Android”-无法找到属性Android:fontvariationsettings和Android:ttcindex

单品
2023-03-14

当我运行Cordova build Android--buildconfig xxxx--release时,我得到以下错误:

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

奇怪的是,我使用两台macOS机器进行编译,而对于相同的代码,我只在其中一台机器上得到这个错误。

:cdvPrintProps
cdvCompileSdkVersion=26
cdvBuildToolsVersion=27.0.3
cdvVersionCode=null
cdvMinSdkVersion=21
cdvBuildMultipleApks=true
cdvReleaseSigningPropertiesFile=release-signing.properties
cdvDebugSigningPropertiesFile=null
cdvBuildArch=null
computedVersionCode=152045989
computedArmv7VersionCode=1520459892
computedX86VersionCode=1520459894
$ cordova plugins list
cordova-custom-config 5.0.2 "cordova-custom-config"
cordova-fabric-plugin 1.1.10 "cordova-fabric-plugin"
cordova-open-native-settings 1.5.0 "Native settings"
cordova-plugin-app-event 1.2.1 "Application Events"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-datepicker 0.9.2 "DatePicker"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-email 1.2.7 "EmailComposer"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-secure-storage 2.6.8 "SecureStorage"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova.plugins.diagnostic 3.9.2 "Diagnostic"
de.appplant.cordova.plugin.local-notification 0.8.5 "LocalNotification"
ionic-plugin-keyboard 2.2.1 "Keyboard"

我怎样才能解决这个问题?

共有1个答案

高化
2023-03-14

只需在build-extras.gradle中添加以下内容

configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-v4:27.1.0'
    }
}
 类似资料:
  • 下面是我的config.yml的一部分: 我有一个用于解析的类: 然而,当我跑的时候 发生以下错误: 为什么它抱怨找不到属性AuthenticationConfig而AuthenticationConfig只是实例变量的名称? 更新在我将实例变量从“private”更改为“public”后,它们被SnakeYaml识别,但这并不是我们所能肯定的。类不被识别为JavaBean。 更新我找到了根本原因

  • 我正在使用gradle来构建和测试我的应用程序。我使用命令 但是当从eclipse中运行时,测试工作完美,当使用gradle运行时失败。我的测试定义如下,它找不到的属性文件在这两个文件夹中: /home/user/Development/git/myproject/src/main/java/com/mycompany/config/home/user/Development/git/myproj

  • 问题内容: 在Windows 7上,我已按以下说明安装了gulp:http : //markgoodyear.com/2014/01/getting-started-with- gulp/ : 在我的应用文件夹中: 我创建一个文件。 但是,当我尝试运行时,出现以下错误消息: 等等 但是存在于(在本地应用程序文件夹中): 知道可能是什么原因吗? 问题答案: 更新 从更高版本开始,无需手动安装gulp

  • 问题内容: 基本上,我试图使用Selenium的Xpath处理以下HTML: 我正在使用以下选择器: 看起来很简单,但是根据Selenium,它返回0个匹配项。我也在在线xpath测试器中尝试过: http://codebeautify.org/Xpath-Tester 而且也不会返回任何结果。奇怪的是,当我删除 xmlns =“ http://www.w3.org/1999/xhtml” -at

  • 当我从项目文件夹运行时,我得到: java也一样: 我在Android Studio安装了JDK,似乎它安装在 设置< code > export JAVA _ HOME =/Users/Mr cloud/Library/Android/SDK/sources/Android-28/或< code > export JAVA _ HOME =/Users/Mr cloud/Library/Andr

  • 我试图运行Webpack上的一个项目和我得到多个错误 我应该安装我所有的打字,所以我不知道这些是从哪里来的。我试图从一个编译的项目中复制package.json,但没有帮助。我错过了什么? 我的tConfig看起来像这样