Gradle Sync Failed Could Not Find Constraint-Layout:1.0.0-Alpha2

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

Support libraries for ConstraintLayout could not be installed/updated.

Just open Preferences > Appearance & Behavior > System Settings > Android and move to SDK Tools tab. Check the following fields and install.

Preferences

Error: Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha5

Make sure you have the latest gradle -- you should only need to have

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
}

In your application gradle file.

If you go in Tools->Android->SDK Manager, in the SDK Tools/Support Repository you should see "ConstraintLayout for Android" and you can verify which version you have.

Also, there was a lot of improvements in Studio -- you should try 2.2 RC. And ConstraintLayout itself is in version alpha 7, there was quite a bit of fixes since alpha 5.

faild to resolve: com.android.support:constraint:constraint-layout

Please use

compile 'com.android.support.constraint:constraint-layout:1.0.2'

Gradle sync failed: Could not install Gradle distribution from https://employer.jfrog.io/employer/gradle-distribution/gradle-7.0-bin.zip'

I'm not sure how exactly to enter these credentials in gradle files

have you tried gradle.properties or env variable ?

What am using to access mine is this function in gradle.build

String getConfigurationProperty(String envVar, String sysProp, String defaultValue) {
def result = System.getenv(envVar) ?: project.findProperty(sysProp)
result ?: defaultValue
}

and then i have local variable to retrive the values , wither from env variable or gradle.properties

artifactoryUser = getConfigurationProperty("ARTIFACTORY_USER", "artifactoryUser", null)
artifactoryPwd = getConfigurationProperty("ARTIFACTORY_PWD", "artifactoryPwd", null)

where ARTIFACTORY_USER is enviroment var and artifactoryUser is gradle.properties variable .

and my gradle.properties look like this

artifactoryUser=user
artifactoryPwd=pass

make sure to add the gradle.properties to .gitignore if your using on Project level . or use on global level at %USER%/.gradle/gradle.properties if your using windows , $HOME/. gradle/gradle.properties or ( ~/. gradle/gradle.properties ) if your using Linux/ubuntu .



Related Topics



Leave a reply



Submit