【问题标题】:Motion editor not working in Android studio 4.0.1运动编辑器在 Android Studio 4.0.1 中不起作用
【发布时间】:2026-01-20 17:55:02
【问题描述】:

我正在尝试在 android studio 4.0.1 中设置动作布局,并且一切正常,直到我在动作编辑器中进行编辑。它渲染得很好,但只要我在运动场景中编辑某些东西,它就会显示

但是我用

implementation 'com.google.android.material:material:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-rc1'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

和android构建工具版本是

classpath 'com.android.tools.build:gradle:4.0.1'

gradle 版本是

distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

我尝试清理>重建项目;使缓存无效并重新启动,删除 .idea 中的 lib 折叠。有什么我想念但需要配置才能使用 Motion Layout 的东西吗?

【问题讨论】:

    标签: android android-studio android-constraintlayout androidx android-motionlayout


    【解决方案1】:

    尝试implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta6' 而不是implementation 'androidx.constraintlayout:constraintlayout:2.0.0-rc1' Constraint Layout 的其他测试版

    【讨论】: