Search code examples
androidandroid-studioandroid-constraintlayoutandroidxandroid-motionlayout

Motion editor not working in Android studio 4.0.1


I am trying to set up motion layout in android studio 4.0.1 and everything works fine until I edit in motion editor. It render fine but as soon as I edit something in motion scene it shows error image.

But I use

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'

and android build tool version is

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

and gradle version is

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

I try clean>rebuild the project; invalidate cache and restart, delete lib fold in .idea. Is there any thing that I miss but need to config to work with Motion Layout?


Solution

  • Try implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta6' instead of implementation 'androidx.constraintlayout:constraintlayout:2.0.0-rc1' or other beta version here at Constraint Layout