我用 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/