Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/328.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Android Studio与Android SDK相关的多个错误_Java_Android_Xml - Fatal编程技术网

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

Java Android Studio与Android SDK相关的多个错误,java,android,xml,Java,Android,Xml,我让Android Studio开始学习和开发Android应用程序,一开始它工作得非常好。我制作了一个helloworld应用程序,然后androidstudio说我应该如何更新一些androidsdk相关的东西,我让它来做。一旦完成下载更新,一切都停止工作。现在,在尝试构建任何Android项目时都会出现一些错误 下面是一些错误。MusicPlayer只是android项目。此外,这些错误是在创建一个新项目后出现的,该项目只有一个主要活动,没有cod变化。注意:我已经尝试完全重新安装Andr

我让Android Studio开始学习和开发Android应用程序,一开始它工作得非常好。我制作了一个helloworld应用程序,然后androidstudio说我应该如何更新一些androidsdk相关的东西,我让它来做。一旦完成下载更新,一切都停止工作。现在,在尝试构建任何Android项目时都会出现一些错误

下面是一些错误。MusicPlayer只是android项目。此外,这些错误是在创建一个新项目后出现的,该项目只有一个主要活动,没有cod变化。注意:我已经尝试完全重新安装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'.

您的项目使用API level 21专有功能,例如
values-v21
中的材质设计样式,但同时该项目仅使用
android sdk windows\platforms\android-20\android.jar
编译,该版本是以前的版本,不知道材质设计


要解决这个问题,请将
build.gradle
文件中的
编译dkversion
(可能还有
targetSdkVersion
)设置为21。

values-v21和
-ic:\android sdk-windows\platforms\android-20\android.jar
的组合是致命的。你在build.gradle文件中没有以v21为目标,你只使用了20。这为我解决了问题,将其作为答案发布,我会检查它。