I just made a migration to androidx through Android Studio menu option Refactor -> Refactor to AndroidX
I\'m getting the following
change your constraint layout dependancy to implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
Make Sure you have added the dependency for constraint layout
dependencies {
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
}
and have made the changes to
<androidx.constraintlayout.widget.ConstraintLayout instead of
<android.support.constraint.ConstraintLayout
I has same issue after:
I also use:
implementation "uk.co.chrisjenx:calligraphy:2.3.0"
I tried all posts from this question, but none success.
I fix it by adding one string .disableCustomViewInflation()
to Calligraphy init:
@Override
public void onCreate() {
super.onCreate();
// ...
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/Sans-Regular.ttf")
.setFontAttrId(R.attr.fontPath)
.disableCustomViewInflation() // <----- this fix
.build());
// ...
}
I hope next release of Calligraphy (Christopher Jenkins thanks for your great job) will fix it inside too.
I mean find mapping and use it in whole project.
I had the same problem, I resolved it as follows:
In your dependecies if you have added
implementation 'androidx.constraintlayout:constraintlayout:1.x.x'
that is correct
but in your xml layout file you have to use the widget as
androidx.constraintlayout.widget.ConstraintLayout
I solve my problem by changing all occurrences of
androidx.constraintlayout.ConstraintLayout
to
androidx.constraintlayout.widget.ConstraintLayout