每当我尝试构建时,Android资源链接都会失败

时间:2019-04-10 05:32:25

标签: java android

每当我尝试构建它时,都会出现此错误,表明android资源链接失败。

 Android resource linking failed
error: resource android:style/TextAppearance.Material not found.
error: resource android:style/TextAppearance.Material.Body1 not found.
error: resource android:style/TextAppearance.Material.Body2 not found.
error: resource android:style/TextAppearance.Material.Button not found.
error: resource android:style/TextAppearance.Material.Caption not found.
error: resource android:style/TextAppearance.Material.Display1 not found.
error: resource android:style/TextAppearance.Material.Display2 not found.
error: resource android:style/TextAppearance.Material.Display3 not found.
error: resource android:style/TextAppearance.Material.Display4 not found.
error: resource android:style/TextAppearance.Material.Headline not found.
error: resource android:style/TextAppearance.Material.Inverse not found.
error: resource android:style/TextAppearance.Material.Large not found.
error: resource android:style/TextAppearance.Material.Large.Inverse not found.
error: resource android:style/TextAppearance.Material.Widget.PopupMenu.Large not found.
error: resource android:style/TextAppearance.Material.Widget.PopupMenu.Small not found.
error: resource android:style/TextAppearance.Material.Medium not found.
error: resource android:style/TextAppearance.Material.Medium.Inverse not found.
error: resource android:style/TextAppearance.Material.Menu not found.
error: resource android:style/TextAppearance.Material.SearchResult.Subtitle not found.
error: resource android:style/TextAppearance.Material.SearchResult.Title not found.

1 个答案:

答案 0 :(得分:0)

确保SDK版本必须与支持库匹配。

如果您的Build.gradle这样表示

  Val New_Val
0   A       X
1   B       X
2   C       X
3   D       Y
4   E       Y
5   F       Y

compileSdkVersion和buildToolsVersion应该

implementation 'com.android.support:appcompat-v7:28.0.0'

有关更多详细信息,请参阅此Answer