android - com.android.ide.common.process.ProcessEx

我尝试在 Android 设备上运行时遇到错误!我不知道发生了什么!

我能做些什么来解决它?

FAILURE:构建失败并出现异常。

构建失败

Total time: 7.791 secs

* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
C:\tmp\myproj\platforms\android\build\intermediates\res\merged\debug\values\values.xml:373: AAPT: Attribute "theme" already defined with incompatible format.

C:\tmp\myproj\platforms\android\build\intermediates\res\merged\debug\values\values.xml:359: AAPT: Original attribute defined here.

C:\tmp\myproj\platforms\android\build\intermediates\res\merged\debug\values-v26\values-v26.xml:15:21-54: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.

C:\tmp\myproj\platforms\android\build\intermediates\res\merged\debug\values\values.xml:373: error: Attribute "theme" already defined with incompatible format.
C:\tmp\myproj\platforms\android\build\intermediates\res\merged\debug\values\values.xml:359: Original attribute defined here.
C:\tmp\myproj\platforms\android\build\intermediates\res\merged\debug\values-v26\values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.



FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

[ERROR] An error occurred while running cordova run android (exit code 1).

已解决

已解决:重新创建项目并再次添加功能!

最佳答案

只需将此代码放在最后一部分的 build.gradle

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

关于android - com.android.ide.common.process.ProcessException : Failed to execute aapt! 我该怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46133995/

相关文章:

build - Gradle 的术语评估和执行之间的区别

maven - Gradle下载依赖错误

visual-studio-2010 - VS2010 : Exclude a project fr

c++ - 在 Eclipse 中设置构建输出目录 - c++

android - 我可以在不运行 Android Studio 时删除这些构建文件夹吗?

android - 我已将 Android SDK 更新为 rev。昨天 22 日,工具中没有 ap

build - 是否可以将命令行变量传递给 bitbake 构建?

gradle - 用gradle复制树并改变结构?

java - ANT:如何将 "add"路径元素从一条路径转换为第二条路径?

deployment - 从不同的文件夹运行 ant exec 任务