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

后端 未结 22 2274
忘了有多久
忘了有多久 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 17:41

    In my case, I was using AS 2.3 and I wanted to use the currently latest ConstraintLayout 1.1.3, but the latest version in my Preferences > Appearance & Behavior > System Settings > Android was 1.0.2.

    To use ConstraintLayout 1.1.3, I updated my AS from 2.3 to currently latest 3.2.1, com.android.tools.build:gradle from 2.2.2 to 3.2.1, gradle from 3.3 to 4.6 and buildToolsVersion from 25.0.0 to 28.0.3.

    I also added maven { url 'https://maven.google.com' } to the Maven repositories in the project-level build.gradle file and that solved my problem.

提交回复
热议问题