File with com.android.support.constraint:constraint-layout:1.0.0-alpha2

11,195

Solution 1

ConstraintLayout 1.0.0-alpha2 is bundled only with Android Studio 2.2 Preview 2. So you have to install the preview from http://tools.android.com/download/studio/canary/latest

Solution 2

change 1.0.0-alpha2 to alpha1 and it should work. I think alpha2 works only with Android Studio preview 2, after that it is changed to alpha1.

Share:
11,195
Simon
Author by

Simon

Updated on June 07, 2022

Comments

  • Simon
    Simon almost 2 years

    I am not very familiar with Android but a friend of my friend said he made an app for my website on his computer. So he sent me the source file and I tried to rebuild the application but it doesn't work. I even tried to create a new project on my computer and copy/paste the code of each page. Then just change the project name but the problem is the same as below and I cant contact him again as he had done it just as a service for me. So I hope someone here can help me with this case because I have really become so tired of trying fix this issue.

    Error message is:

    Maven package paths must start with m2repository
    com.intellij.openapi.diagnostic.Logger$EmptyThrowable
        at com.intellij.openapi.diagnostic.Logger.error(Logger.java:117)
        at com.android.tools.idea.sdk.wizard.InstallSelectedPackagesStep$CustomLogger.logError(InstallSelectedPackagesStep.java:403)
        at com.android.sdklib.repositoryv2.MavenInstaller.install(MavenInstaller.java:102)
        at com.android.tools.idea.sdk.wizard.InstallSelectedPackagesStep$InstallTask.run(InstallSelectedPackagesStep.java:242)
        at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
        at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
        at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:366)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
        at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
    

    apply plugin: 'com.android.application'
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.3"
        defaultConfig {
            applicationId "co.berava"
            minSdkVersion 15
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2'
        compile 'com.android.support:appcompat-v7:23.4.0'
        testCompile 'junit:junit:4.12'
        androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
        androidTestCompile 'com.android.support.test:runner:0.5'
        androidTestCompile 'com.android.support:support-annotations:23.4.0'
        compile 'com.github.delight-im:Android-AdvancedWebView:v2.1.0'
    }
    

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.1.2'
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            maven { url "https://jitpack.io" }
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    
  • Valentin Filyov
    Valentin Filyov over 7 years
    Changing to alpha1 fixed mine :) Showing me that alpha1 is obsolete though .... :/