java - 每当在android studio中打开新项目时,可绘制的ic_launcher_background.xml文件中的错误
问题描述
在我之前的项目中没有这样的问题,ic_launcher_background.xml
文件也不同。
<?xml version="1.0" encoding="utf-8"?>
<view xmlns:android="http://schemas.android.com/apk/res/android"
style="?attr/snackbarStyle"
class="com.google.android.material.snackbar.Snackbar$SnackbarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:theme="@style/ThemeOverlay.AppCompat.Dark" />
错误格式不正确
解决方案
删除这个
style="?attr/snackbarStyle"
class="com.google.android.material.snackbar.Snackbar$SnackbarLayout"
代码将是这样的。
<?xml version="1.0" encoding="utf-8"?>
<view xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:theme="@style/ThemeOverlay.AppCompat.Dark" />
推荐阅读
- mysql - 我的mac上的路径中是否应该有重复的信息?
- java - 为 Couchbase lite 2.x 和同步网关设置复制器时出现问题
- python - 如何安装我的自定义 python 包及其自定义依赖项?
- python - 将序列转换为数组元素
- unity3d - 如何在运行时使用 MonoBehaviour 设置着色器设置/属性?
- javascript - 如何在 Ember JS 中的父路由或控制器中获取嵌套的 routeName
- php - 内容上的白框(移动视图)
- matlab - 编辑条形图中分类值的字体大小?
- php - 如何使用 Composser 在 MacO 上运行两个不同版本(v2 和 v4)的 symfony 项目
- c# - 通过表达式选择方法时,没有重载与委托“操作”匹配