我正在阅读关于Android的房间库.我看到他们改变包装android来androidx.我不明白.请有人解释一下.
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
Run Code Online (Sandbox Code Playgroud)
即使这也适用于android包装.
implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"
Run Code Online (Sandbox Code Playgroud)
androidx而不是android.android android-architecture-components android-jetpack androidx
任何人都可以帮助为什么会出错?
一切都很好,突然间出现了这个错误.
我用Google搜索但无法得到任何东西!请帮忙
错误:(7,41)找不到与给定名称匹配的资源(在'dialogCornerRadius'中,值为'?android:attr/dialogCornerRadius').
apply plugin: 'com.android.application'
//Add these lines
def Base_URL = '"' + WEBServiceBaseURL + '"' ?: '"Define BASE URL"';
def SMS_Base_URL = '"' + WEBServiceBaseSMSURL + '"' ?: '"Define SMS BASE URL"';
android.buildTypes.each { type ->
type.buildConfigField 'String', 'Base_URL', WEBServiceBaseURL
type.buildConfigField 'String', 'SMS_Base_URL', WEBServiceBaseSMSURL
}
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.bla.bla"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles …Run Code Online (Sandbox Code Playgroud) 嗨,我当时在一个项目中,我使用了许多库依赖项。它工作正常,但突然开始报告错误。我是使用库依赖项的新手,并且正在使用Firebase数据库和存储,并且还在app文件夹下添加了google-services.json。我不明白问题出在哪里。预先感谢您的帮助
以下是错误列表
`执行任务:[:app:assembleDebug]
配置项目:app在[src / nullnull / debug,src / debug / nullnull,src / nullnull,src / debug,src / nullnDebug]中查找时找不到google-services.json
任务:app:buildInfoDebugLoader任务:app:preBuild UP-TO-DATE任务:app:preDebugBuild UP-TO-DATE任务:app:compileDebugAidl NO-SOURCE任务:app:compileDebugRenderscript UP-TO-DATE任务:app:checkDebugManifest UP- TO-DATE任务:app:generateDebugBuildConfig UP-TO-DATE任务:app:prepareLintJar UP-TO-DATE任务:app:generateDebugSources任务:app:javaPreCompileDebug UP-TO-DATE任务:app:mainApkListPersistenceDebug UP-TO-DATE任务: app:generateDebugResValues截止日期任务:app:generateDebugResources截止日期
任务:app:processDebugGoogleServices解析json文件:C:\ Users \ alexa \ AndroidStudioProjects \ eCommerceProject \ app \ google-services.json
任务:app:mergeDebugResources截止日期任务:app:createDebugCompatibleScreenManifests截止日期
任务:app:processDebugManifest失败C:\ Users \ alexa \ AndroidStudioProjects \ eCommerceProject \ app \ src \ main \ AndroidManifest.xml:22:18-91错误:属性application @ appComponentFactory value =(android.support.v4.app.Core.Factory )中的)也出现在[androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86中。值=(androidx.core.app.CoreComponentFactory)。建议:在AndroidManifest.xml:8:5-36:19的元素上添加'tools:replace =“ android:appComponentFactory”'以进行覆盖。
有关清单合并的更多信息,请参见http://g.co/androidstudio/manifest-merger。
任务:app:buildInfoGeneratorDebug
失败:构建失败,发生异常。
出了什么问题:任务':app:processDebugManifest'的执行失败。
清单合并失败:来自[com.android.support:support-compat:28.0.0]的属性application @ appComponentFactory value =(android.support.v4.app.CoreComponentFactory)来自AndroidManifest.xml:22:18-91 [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 …
android android-manifest android-support-library google-play-services
android ×3
android-architecture-components ×1
androidx ×1
build-error ×1
dependencies ×1
gradle ×1