我已经为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
答案 0 :(得分:0)
我遇到过与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