Gradle Sync failed could not find constraint-layout:1.0.0-alpha2

后端 未结 22 2286
忘了有多久
忘了有多久 2020-11-27 17:39

Problem :

Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha2.
Required by:
myapp:app:unspecified
         


        
22条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 18:08

    First I tried everything that I have read on stackoverflow...from updating gradle to XY version, to updating ConstraintLayout to XY version...I even update my SDK tools and Android Studio to the latest version...but nothing was working.

    The only solution that worked for me was that I delete ConstraintLayout library from gradle and SDK, then I opened random xml layout and in Design view under Palette section search for ConstraintLayout. If you have successfully deleted library from your project then you will be able to install the library from there if you double clicked on ConstraintLayout element.

    That has create next line in my app build.gradle:

    'com.android.support.constraint:constraint-layout:1.0.0-beta1'
    

    In my project build.gradle I have this:

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

    Android studio version 2.2.2

提交回复
热议问题