• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Androidx 和数据绑定

用户头像
it1352
帮助5

问题说明

我正在将 Android P 测试的依赖项迁移到 androidx 依赖项.由于一些不太明确的原因,我的项目不再编译(不,我不会提供详细信息以避免出现明显的问题).我发现(通过 gradlew dependencies)数据绑定使用oldschool"依赖 android.arch.lifecycle:runtime:1.0.3 而不是 androidx.lifecycle:lifecycle-runtime:2.0.0-beta01.我想这可能是原因之一.

I'm migrating my dependencies for an Android P test to the androidx dependencies. For some not very clear reasons my project does not compile anymore (and no I won't provide the details to avoid a distinct problem). I found out (via gradlew dependencies) that the databinding uses the "oldschool" dependency android.arch.lifecycle:runtime:1.0.3 instead of androidx.lifecycle:lifecycle-runtime:2.0.0-beta01. I guess that could be one reason.

知道如何强制使用新的包名称/依赖项吗?

Any idea how to force using the new package names/dependencies?

正确答案

#1

我在互联网连接较弱的情况下尝试过,所以我跳过更新到 Android Studio 3.2.那是我的错.随着升级(解压缩花了将近一个小时,不知道为什么)我还被要求将我的构建工具升级到 com.android.tools.build:gradle:3.2.0-beta04(或任何与您的 Android Studio 版本匹配的最新版本(我不会安装 3.3.0-alpha03)并将 gradle 包装器升级到 4.6.

I tried that while I had a weak internet connection, so I skipped to update to Android Studio 3.2. That was my fault. With that upgrade (the unziping took almost an hour no idea why) I was requested also to upgrade my build tools to com.android.tools.build:gradle:3.2.0-beta04 (or whatever is the newest version matching for your Android Studio version (I would not install the 3.3.0-alpha03) and upgraded the gradle wrapper to 4.6.

现在依赖消失了,我很高兴.

Now the dependencies are gone and I'm happy.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhbbhcik
系列文章
更多 icon
同类精品
更多 icon
继续加载