Error inflating class androidx.constraintlayout.ConstraintLayout after migration to androidx











up vote
4
down vote

favorite
2












I just made a migration to androidx through Android Studio menu option Refactor -> Refactor to AndroidX



I'm getting the following error:




android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout




Any idea?



Stacktrace:



2018-10-19 00:25:58.128 28131-28131/com.midounoo.midounoo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.midounoo.midounoo, PID: 28131
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.midounoo.midounoo/com.midounoo.midounoo.Base.MainActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2724)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6255)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.ConstraintLayout" on path: DexPathList[[zip file "/data/app/com.midounoo.midounoo-2/base.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.midounoo.midounoo-2/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:609)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.midounoo.midounoo.Base.MainActivity.onCreate(MainActivity.java:43)
at android.app.Activity.performCreate(Activity.java:6666)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6255)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)









share|improve this question
























  • Show the whole stacktrace please.
    – TheWanderer
    Oct 18 at 21:08










  • Please share your app level build gradle so that we can see the dependencies.
    – Abhinav Saxena
    Nov 23 at 10:54















up vote
4
down vote

favorite
2












I just made a migration to androidx through Android Studio menu option Refactor -> Refactor to AndroidX



I'm getting the following error:




android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout




Any idea?



Stacktrace:



2018-10-19 00:25:58.128 28131-28131/com.midounoo.midounoo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.midounoo.midounoo, PID: 28131
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.midounoo.midounoo/com.midounoo.midounoo.Base.MainActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2724)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6255)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.ConstraintLayout" on path: DexPathList[[zip file "/data/app/com.midounoo.midounoo-2/base.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.midounoo.midounoo-2/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:609)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.midounoo.midounoo.Base.MainActivity.onCreate(MainActivity.java:43)
at android.app.Activity.performCreate(Activity.java:6666)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6255)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)









share|improve this question
























  • Show the whole stacktrace please.
    – TheWanderer
    Oct 18 at 21:08










  • Please share your app level build gradle so that we can see the dependencies.
    – Abhinav Saxena
    Nov 23 at 10:54













up vote
4
down vote

favorite
2









up vote
4
down vote

favorite
2






2





I just made a migration to androidx through Android Studio menu option Refactor -> Refactor to AndroidX



I'm getting the following error:




android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout




Any idea?



Stacktrace:



2018-10-19 00:25:58.128 28131-28131/com.midounoo.midounoo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.midounoo.midounoo, PID: 28131
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.midounoo.midounoo/com.midounoo.midounoo.Base.MainActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2724)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6255)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.ConstraintLayout" on path: DexPathList[[zip file "/data/app/com.midounoo.midounoo-2/base.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.midounoo.midounoo-2/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:609)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.midounoo.midounoo.Base.MainActivity.onCreate(MainActivity.java:43)
at android.app.Activity.performCreate(Activity.java:6666)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6255)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)









share|improve this question















I just made a migration to androidx through Android Studio menu option Refactor -> Refactor to AndroidX



I'm getting the following error:




android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout




Any idea?



Stacktrace:



2018-10-19 00:25:58.128 28131-28131/com.midounoo.midounoo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.midounoo.midounoo, PID: 28131
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.midounoo.midounoo/com.midounoo.midounoo.Base.MainActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2724)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6255)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.ConstraintLayout" on path: DexPathList[[zip file "/data/app/com.midounoo.midounoo-2/base.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.midounoo.midounoo-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.midounoo.midounoo-2/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:609)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.midounoo.midounoo.Base.MainActivity.onCreate(MainActivity.java:43)
at android.app.Activity.performCreate(Activity.java:6666)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6255)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)






android androidx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 at 9:13









Pang

6,8301563101




6,8301563101










asked Oct 18 at 21:07









KevinMo

816




816












  • Show the whole stacktrace please.
    – TheWanderer
    Oct 18 at 21:08










  • Please share your app level build gradle so that we can see the dependencies.
    – Abhinav Saxena
    Nov 23 at 10:54


















  • Show the whole stacktrace please.
    – TheWanderer
    Oct 18 at 21:08










  • Please share your app level build gradle so that we can see the dependencies.
    – Abhinav Saxena
    Nov 23 at 10:54
















Show the whole stacktrace please.
– TheWanderer
Oct 18 at 21:08




Show the whole stacktrace please.
– TheWanderer
Oct 18 at 21:08












Please share your app level build gradle so that we can see the dependencies.
– Abhinav Saxena
Nov 23 at 10:54




Please share your app level build gradle so that we can see the dependencies.
– Abhinav Saxena
Nov 23 at 10:54












4 Answers
4






active

oldest

votes

















up vote
6
down vote



accepted










I solve my problem by changing all occurrences of




androidx.constraintlayout.ConstraintLayout




to




androidx.constraintlayout.widget.ConstraintLayout







share|improve this answer



















  • 1




    Yep, error in Android studio transformations, must change all occurence in xml layout with androidx.constraintlayout.widget.ConstraintLayout ... thanks
    – issamux
    Nov 21 at 22:56


















up vote
3
down vote













add androidx.constraintlayout.ConstraintLayout to the dependencies:



dependencies  {
// https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
}


the repository is mavenCentral().






share|improve this answer





















  • Thanks for the answer but I already added the dependency
    – KevinMo
    Oct 18 at 22:15










  • The second constraintlayout does not start by uppercase C however. Correct one: 'androidx.constraintlayout:constraintlayout:1.1.3'
    – Mohsen
    Oct 19 at 14:35


















up vote
0
down vote













problem in your layout xml file



change this androidx.constraintlayout.ConstraintLayout
to linear layout
check your log






share|improve this answer





















  • After changing to LinearLayout, the activity starts correctly. Curious
    – KevinMo
    Oct 18 at 22:14


















up vote
0
down vote













yepp.
mavenCentral() and correct dependencies solve my same problems






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52882606%2ferror-inflating-class-androidx-constraintlayout-constraintlayout-after-migration%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    6
    down vote



    accepted










    I solve my problem by changing all occurrences of




    androidx.constraintlayout.ConstraintLayout




    to




    androidx.constraintlayout.widget.ConstraintLayout







    share|improve this answer



















    • 1




      Yep, error in Android studio transformations, must change all occurence in xml layout with androidx.constraintlayout.widget.ConstraintLayout ... thanks
      – issamux
      Nov 21 at 22:56















    up vote
    6
    down vote



    accepted










    I solve my problem by changing all occurrences of




    androidx.constraintlayout.ConstraintLayout




    to




    androidx.constraintlayout.widget.ConstraintLayout







    share|improve this answer



















    • 1




      Yep, error in Android studio transformations, must change all occurence in xml layout with androidx.constraintlayout.widget.ConstraintLayout ... thanks
      – issamux
      Nov 21 at 22:56













    up vote
    6
    down vote



    accepted







    up vote
    6
    down vote



    accepted






    I solve my problem by changing all occurrences of




    androidx.constraintlayout.ConstraintLayout




    to




    androidx.constraintlayout.widget.ConstraintLayout







    share|improve this answer














    I solve my problem by changing all occurrences of




    androidx.constraintlayout.ConstraintLayout




    to




    androidx.constraintlayout.widget.ConstraintLayout








    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 23 at 12:40









    Abhinav Saxena

    1,28911232




    1,28911232










    answered Oct 19 at 18:34









    KevinMo

    816




    816








    • 1




      Yep, error in Android studio transformations, must change all occurence in xml layout with androidx.constraintlayout.widget.ConstraintLayout ... thanks
      – issamux
      Nov 21 at 22:56














    • 1




      Yep, error in Android studio transformations, must change all occurence in xml layout with androidx.constraintlayout.widget.ConstraintLayout ... thanks
      – issamux
      Nov 21 at 22:56








    1




    1




    Yep, error in Android studio transformations, must change all occurence in xml layout with androidx.constraintlayout.widget.ConstraintLayout ... thanks
    – issamux
    Nov 21 at 22:56




    Yep, error in Android studio transformations, must change all occurence in xml layout with androidx.constraintlayout.widget.ConstraintLayout ... thanks
    – issamux
    Nov 21 at 22:56












    up vote
    3
    down vote













    add androidx.constraintlayout.ConstraintLayout to the dependencies:



    dependencies  {
    // https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout
    implementation "androidx.constraintlayout:constraintlayout:1.1.3"
    }


    the repository is mavenCentral().






    share|improve this answer





















    • Thanks for the answer but I already added the dependency
      – KevinMo
      Oct 18 at 22:15










    • The second constraintlayout does not start by uppercase C however. Correct one: 'androidx.constraintlayout:constraintlayout:1.1.3'
      – Mohsen
      Oct 19 at 14:35















    up vote
    3
    down vote













    add androidx.constraintlayout.ConstraintLayout to the dependencies:



    dependencies  {
    // https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout
    implementation "androidx.constraintlayout:constraintlayout:1.1.3"
    }


    the repository is mavenCentral().






    share|improve this answer





















    • Thanks for the answer but I already added the dependency
      – KevinMo
      Oct 18 at 22:15










    • The second constraintlayout does not start by uppercase C however. Correct one: 'androidx.constraintlayout:constraintlayout:1.1.3'
      – Mohsen
      Oct 19 at 14:35













    up vote
    3
    down vote










    up vote
    3
    down vote









    add androidx.constraintlayout.ConstraintLayout to the dependencies:



    dependencies  {
    // https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout
    implementation "androidx.constraintlayout:constraintlayout:1.1.3"
    }


    the repository is mavenCentral().






    share|improve this answer












    add androidx.constraintlayout.ConstraintLayout to the dependencies:



    dependencies  {
    // https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout
    implementation "androidx.constraintlayout:constraintlayout:1.1.3"
    }


    the repository is mavenCentral().







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Oct 18 at 21:22









    Martin Zeitler

    12.6k33560




    12.6k33560












    • Thanks for the answer but I already added the dependency
      – KevinMo
      Oct 18 at 22:15










    • The second constraintlayout does not start by uppercase C however. Correct one: 'androidx.constraintlayout:constraintlayout:1.1.3'
      – Mohsen
      Oct 19 at 14:35


















    • Thanks for the answer but I already added the dependency
      – KevinMo
      Oct 18 at 22:15










    • The second constraintlayout does not start by uppercase C however. Correct one: 'androidx.constraintlayout:constraintlayout:1.1.3'
      – Mohsen
      Oct 19 at 14:35
















    Thanks for the answer but I already added the dependency
    – KevinMo
    Oct 18 at 22:15




    Thanks for the answer but I already added the dependency
    – KevinMo
    Oct 18 at 22:15












    The second constraintlayout does not start by uppercase C however. Correct one: 'androidx.constraintlayout:constraintlayout:1.1.3'
    – Mohsen
    Oct 19 at 14:35




    The second constraintlayout does not start by uppercase C however. Correct one: 'androidx.constraintlayout:constraintlayout:1.1.3'
    – Mohsen
    Oct 19 at 14:35










    up vote
    0
    down vote













    problem in your layout xml file



    change this androidx.constraintlayout.ConstraintLayout
    to linear layout
    check your log






    share|improve this answer





















    • After changing to LinearLayout, the activity starts correctly. Curious
      – KevinMo
      Oct 18 at 22:14















    up vote
    0
    down vote













    problem in your layout xml file



    change this androidx.constraintlayout.ConstraintLayout
    to linear layout
    check your log






    share|improve this answer





















    • After changing to LinearLayout, the activity starts correctly. Curious
      – KevinMo
      Oct 18 at 22:14













    up vote
    0
    down vote










    up vote
    0
    down vote









    problem in your layout xml file



    change this androidx.constraintlayout.ConstraintLayout
    to linear layout
    check your log






    share|improve this answer












    problem in your layout xml file



    change this androidx.constraintlayout.ConstraintLayout
    to linear layout
    check your log







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Oct 18 at 21:18









    Bholendra Singh

    157




    157












    • After changing to LinearLayout, the activity starts correctly. Curious
      – KevinMo
      Oct 18 at 22:14


















    • After changing to LinearLayout, the activity starts correctly. Curious
      – KevinMo
      Oct 18 at 22:14
















    After changing to LinearLayout, the activity starts correctly. Curious
    – KevinMo
    Oct 18 at 22:14




    After changing to LinearLayout, the activity starts correctly. Curious
    – KevinMo
    Oct 18 at 22:14










    up vote
    0
    down vote













    yepp.
    mavenCentral() and correct dependencies solve my same problems






    share|improve this answer

























      up vote
      0
      down vote













      yepp.
      mavenCentral() and correct dependencies solve my same problems






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        yepp.
        mavenCentral() and correct dependencies solve my same problems






        share|improve this answer












        yepp.
        mavenCentral() and correct dependencies solve my same problems







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 19 at 11:17









        Ya Si

        216




        216






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52882606%2ferror-inflating-class-androidx-constraintlayout-constraintlayout-after-migration%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'