1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > 近段时间的学习碎片整理(6)

近段时间的学习碎片整理(6)

时间:2023-10-04 08:58:37

相关推荐

近段时间的学习碎片整理(6)

1、ripple

<?xml version="1.0" encoding="utf-8"?><ripple xmlns:android="/apk/res/android"android:color="@color/gray1"><item android:id="@android:id/mask"android:drawable="@drawable/background_about_us"/><item android:drawable="@drawable/background_about_us"/></ripple>

background_about_us可以是控件想要的样式

2、安卓room构建错误

Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide room.schemaLocation annotation processor argument OR set exportSchema to false.

查找了很多,基本的解答都是在build.gradle上加上

可参考(Room - Schema导出目录未提供给注释处理器,因此我们无法导出架构_CHCH998的博客-CSDN博客)

android {...defaultConfig {...javaCompileOptions {annotationProcessorOptions {arguments = ["room.schemaLocation":"$projectDir/schemas".toString()]}}}}

但是我一直还是会有这个提示警告,如果用的是kotlin的话,不妨试试加上

android {defaultConfig {kapt {arguments {arg("room.schemaLocation", "$projectDir/schemas".toString())}}}}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。