简体   繁体   English

Android Studio与Android SDK相关的多个错误

[英]Android Studio multiple errors related to Android SDK

I got Android Studio to begin to learn and develop Android applications and it worked perfectly fine at first. 我让Android Studio开始学习和开发Android应用程序,起初它运行良好。 I made a hello world application then Android Studio said something about how I should update some android sdk related thing and I let it do that. 我制作了一个hello world应用程序,然后Android Studio说了一些有关如何更新与android sdk相关的内容的事情,我让它做到了。 Once it completed downloading that update, everything stopped working. 完成下载该更新后,所有内容均停止工作。 Now there is several errors when trying to build any Android project. 现在,在尝试构建任何Android项目时都会出现一些错误。

Here are some of the errors. 这是一些错误。 MusicPlayer is just the android project. MusicPlayer只是android项目。 Also, these are errors that come up after making a fresh new project with just a main activity and no cod changes. 同样,这些是在制作新的项目而只是进行一项主要活动而没有更改鳕鱼之后出现的错误。 NOTE: I have already tried completely re installing the Android SDK. 注意:我已经尝试完全重新安装Android SDK。

Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    C:\android-sdk-windows\build-tools\21.1.1\aapt.exe package -f --no-crunch -I C:\android-sdk-windows\platforms\android-20\android.jar -M C:\MusicPlayer\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S C:\MusicPlayer\app\build\intermediates\res\debug -A C:\MusicPlayer\app\build\intermediates\assets\debug -m -J C:\MusicPlayer\app\build\generated\source\r\debug -F C:\MusicPlayer\app\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package musicplayer.chasesmith.com.musicplayer -0 apk --output-text-symbols C:\MusicPlayer\app\build\intermediates\symbols\debug
Error Code:
    1
Output:
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:9: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:10: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:11: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:12: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:13: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:14: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:15: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:16: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:17: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:18: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:21: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Menu'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:23: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:24: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Title'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small.Inverse'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:27: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Subhead'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:28: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Title'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:30: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:31: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:32: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:34: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:35: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:36: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:37: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:38: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:39: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v11\values.xml:45: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v14\values.xml:10: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v11\values.xml:51: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v14\values.xml:17: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v11\values.xml:57: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v14\values.xml:24: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v11\values.xml:63: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v14\values.xml:31: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:45: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:46: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.ActionBar'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:49: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:55: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark.ActionBar'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:62: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Light'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:216: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:217: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:218: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:219: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:220: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:228: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:229: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.DropDownItem.Spinner'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:230: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:231: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:232: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:233: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:234: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.PopupMenu'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:237: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:239: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:240: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:241: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:242: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:245: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:247: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:248: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:249: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:250: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:255: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Toolbar.Button.Navigation'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:256: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:260: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Dialog'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:264: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:268: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:100: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:102: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:103: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:101: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:98: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:99: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:137: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:139: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:140: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:138: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:135: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:136: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:174: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:176: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:177: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:175: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:172: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:173: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:211: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:213: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:214: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:212: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:209: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
    C:\MusicPlayer\app\build\intermediates\res\debug\values-v21\values.xml:210: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

Your project uses API level 21 exclusive features, eg material design styles in values-v21 but the project is at the same time only compiled with android-sdk-windows\\platforms\\android-20\\android.jar - the prior version, that did not know about material design. 您的项目使用API​​级别21的独有功能,例如values-v21材料设计样式,但是该项目同时仅使用android-sdk-windows\\platforms\\android-20\\android.jar以前的版本进行了编译,不知道材料设计。

To fix that, up the compileSdkVersion (and probably targetSdkVersion ) in your build.gradle file to 21. 要解决此问题,请将build.gradle文件中的compileSdkVersion (可能targetSdkVersionbuild.gradle到21。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM