android - Cordova 构建到 Android 错误

标签 android cordova android-studio construct

我用 Construct 2 制作了一个应用程序,然后导出到英特尔 XDK。然后我导出到 cordova,每次我尝试使用“cordova build android”构建时,我都会收到此错误:

错误:在 FontFamilyFont 中,找不到属性 android:t tc索引

失败

失败:构建失败,出现异常。

  • 出了什么问题: 任务 ':processDebugResources' 执行失败。

    com.android.ide.common.process.ProcessException: Failed to execute aapt

  • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 运行 获得更多日志输出的选项。

构建失败

总时间:47.337 秒

Command finished with error code 1: cmd /s /c "C:\Users\Gustavo\app\platfo
rms\android\gradlew.bat cdvBuildDebug -b C:\Users\Gustavo\app\platforms\an
droid\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pand
roid.useDeprecatedNdk=true"
Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
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

我是第一次在这里发帖,所以如果我做错了什么,请告诉我。

最佳答案

感谢您的帮助!

我通过将此添加到 build-extras.gradle 文件中来成功构建:

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

并通过安装 cordova-android-support-gradle-release。

关于android - Cordova 构建到 Android 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49355101/

相关文章:

java - FirebaseRecyclerAdapter 但未能将 java.util.HashMap 类型的值转换为字符串?

ANDROID 在 map View 中显示最近的 10 个位置

javascript - PhoneGap确认回调函数

javascript - phonegap-cordova - javascript,字符串的希伯来语值未正确编码

android - CMake 选项不包括 Android Studio 中的 SDK 工具设置

java - 防止倾斜调用 onCreate,以及 Activity 运行的时间测量。

bash - Phonegap CLI从SSH session 运行,但不是从bash脚本运行

android - 此 gradle 插件至少需要 Android Studio 3.0

android - 如何将 App Inventor 2 ".keystore"文件导入或添加到 Android Studio

android - 有时,当添加到处理程序内部时,Toast 在 Activity 或内部 fragment 中不可见