【发布时间】: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 android和Cordova platform add android再次删除和添加平台 -
是的,试过了,没有任何反应。同样的问题