android glide缺少方法,Android上的材料google库中缺少组件

我想用

SwitchMaterial

Android项目中的组件,但是Android studio在设计时找不到它,并且将它包含在我的xml布局中会导致

ClassNotFoundException

在运行时。

'com.google.android.material:material:1.0.0'

是在我的依赖关系和梯度同步没有错误

还有一些其他的材料成分(如我正在使用的)

MaterialButton

在同一个XML/活动上

com.google.android.material.switchmaterial.SwitchMaterial

xml格式

无法导入

尝试添加到活动java单元时

没有预先保护规则设置,所以不应该弄乱它

找不到

开关材料

即使有其他组件

153d1460fe98c88e81178421667e1a08.png

应用程序build.gradle

apply plugin: 'com.android.application'

android {

compileSdkVersion 29

buildToolsVersion "29.0.2"

defaultConfig {

applicationId "my.app.id"

minSdkVersion 19

targetSdkVersion 29

versionCode 1

versionName "0.0.1"

}

buildTypes {

release {

minifyEnabled true

proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

}

}

dexOptions {

javaMaxHeapSize "6g"

}

lintOptions {

lintConfig file("lint.xml")

showAll false

}

}

dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.1.0'

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

implementation 'com.github.bumptech.glide:glide:4.10.0'

implementation 'com.google.android.material:material:1.0.0'

implementation 'com.google.code.gson:gson:2.8.6'

}

android:id="@+id/login_notificationsSwitchFamily"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginBottom="@dimen/margin_10"

android:checked="true"

android:text="Family Friendly"

android:textSize="@dimen/textSize_16" />

如有任何帮助,我们将不胜感激。我不明白为什么会有组件丢失。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值