1. Are you ready for the Galaxy S20? Here is everything we know so far!

Project build problem

Discussion in 'Android Development' started by EmbededPower, Jul 31, 2017.

  1. EmbededPower

    EmbededPower Newbie
    Thread Starter

    I am following a tutorial on how to make a bottom navigation bar and he is using the CoordinatorLayout. When i go to add it to the dependencies and then try to sync it I get the following error: Failed to resolve: com.android.support:design:26.0.0

    Any idea on how to fix this?
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Deleted User

    Deleted User Guest

    What is in your build.gradle file?
     
  3. EmbededPower

    EmbededPower Newbie
    Thread Starter

    SOrry for the late reply. I was at work.

    My build.gradle looks like this:
    Code (Text):
    1. apply plugin: 'com.android.application'
    2.  
    3. android {
    4.     compileSdkVersion 26
    5.     buildToolsVersion "26.0.1"
    6.     defaultConfig {
    7.         applicationId "com.example.johnathan.myapplication"
    8.         minSdkVersion 15
    9.         targetSdkVersion 26
    10.         versionCode 1
    11.         versionName "1.0"
    12.         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    13.     }
    14.     buildTypes {
    15.         release {
    16.             minifyEnabled false
    17.             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    18.         }
    19.     }
    20. }
    21.  
    22. dependencies {
    23.     compile fileTree(dir: 'libs', include: ['*.jar'])
    24.     androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    25.         exclude group: 'com.android.support', module: 'support-annotations'
    26.     })
    27.     compile 'com.android.support:appcompat-v7:26.+'
    28.     compile 'com.android.support.constraint:constraint-layout:1.0.2'
    29.     testCompile 'junit:junit:4.12'
    30.     compile 'com.android.support:design:26.0.0'
    31. }
    32.  
     
  4. IArdel

    IArdel Lurker

    Add this to your project level build.gradle file:

    repositories {
    maven {
    url "https://maven.google.com"
    }
    }

    if it's wont work, try to use: "compile 'com.android.support:appcompat-v7:26.0.0-alpha1'"
     
Loading...

Share This Page

Loading...