【问题标题】:Execution failed for task ':processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt任务“:processDebugResources”执行失败。 com.android.ide.common.process.ProcessException:无法执行 aapt
【发布时间】:2018-05-01 23:20:09
【问题描述】:

我附上了cordova构建的完整日志,请建议如何解决这个问题:

cordova build android
....
....    
:processDebugResourcesC:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:170: AAPT: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:176: AAPT: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:182:21-37: AAPT: No resource found that matches the given name: attr 'colorPrimaryDark'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:184: AAPT: Error retrieving parent for item: No resource found that matches the given name 'Widget.Design.TextInputLayout'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:190:21-32: AAPT: No resource found that matches the given name: attr 'colorAccent'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:192:21-42: AAPT: No resource found that matches the given name: attr 'colorControlActivated'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:191:21-39: AAPT: No resource found that matches the given name: attr 'colorControlNormal'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:200: AAPT: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:203:21-40: AAPT: No resource found that matches the given name: attr 'actionMenuTextColor'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:204:21-36: AAPT: No resource found that matches the given name: attr 'windowActionBar'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:170: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:176: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:182: error: Error: No resource found that matches the given name: attr 'colorPrimaryDark'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:184: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.Design.TextInputLayout'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:190: error: Error: No resource found that matches the given name: attr 'colorAccent'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:192: error: Error: No resource found that matches the given name: attr 'colorControlActivated'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:191: error: Error: No resource found that matches the given name: attr 'colorControlNormal'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:200: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:203: error: Error: No resource found that matches the given name: attr 'actionMenuTextColor'.

C:\Users\sushovan\IdeaProjects\cometchat-cordova-sampleapp\platforms\android\build\intermediates\res\merged\debug\values\values.xml:204: error: Error: No resource found that matches the given name: attr 'windowActionBar'.


 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
  • 我已经完成了cordova平台更新android,没有任何反应。
  • 我已经完成了cordova平台删除android;科尔多瓦平台添加 安卓;

【问题讨论】:

  • 您使用的是哪个 Cordova 和 Cordova-android 版本?
  • cordova --version = 7.1.0 cordova 平台 = android 6.3.0
  • 您是否尝试过通过Cordova platform remove androidCordova platform add android 再次删除和添加平台
  • 是的,试过了,没有任何反应。同样的问题

标签: android cordova


【解决方案1】:

我在使用 cordova 和 android 7.0.0 时遇到了类似的问题。 这有帮助:

sudo rm -rf /usr/local/lib/node_modules/npm
brew reinstall node

sudo npm install -g cordova
npm i -g npm to update

cd my_project
cordova platform remove android
cordova platform add android@7.0.0

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-15
    • 1970-01-01
    • 1970-01-01
    • 2016-10-18
    • 2023-03-16
    • 2015-05-09
    • 2023-03-22
    • 2016-06-27
    相关资源
    最近更新 更多