我希望使编辑文本成为浮动标签类型。所以我在依赖项下添加了它:
implementation 'com.android.support:design:28.0.0'
现在,我在“渲染问题”下遇到此错误:
Render Problem
Failed to find style 'chipIconSize' in current theme
上述错误显示在xml预览中。
这是build gradle(模块应用)中的依赖项:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
//noinspection GradleCompatible
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.android.gms:play-services-location:16.0.0'
// implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.3'
implementation 'com.google.firebase:firebase-auth:16.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
}
logcat在Java编译器下显示以下错误和警告:
The app gradle file must have a dependency on com.google.firebase:firebase-core for Firebase services to work as intended.
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
如何解决该错误?
答案 0 :(得分:0)
应用gradle文件必须依赖于
com.google.firebase:firebase-core
使Firebase服务能够像
添加:
implementation 'com.google.firebase:firebase-core:16.0.4'
对您的build.gradle
依赖项。
对于:
无法在当前主题中找到样式'
chipIconSize
'
似乎需要添加:
implementation 'com.google.android.material:material:1.0.0'
要从材质设计中支持该属性,或者简单地将其删除即可。
检查此链接: https://material.io/develop/android/docs/getting-started/