1

I have been trying to implement Android's Design Support Library without success. I have followed the steps from here. After a few issues with Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (xxx) and test app (xxx) differ. I managed to fix that. However now I am getting a new error: enter image description here

I will post my .gradle files below so maybe you guys can help me out. I took out everything about unit testing and instrumentation testing that were causing the initial warning.

(1)

buildscript {
repositories
        {
            mavenCentral()
        }
dependencies
        {
            classpath 'com.android.tools.build:gradle:1.3.0'
            classpath 'com.newrelic.agent.android:agent-gradle-plugin:5.+'
            classpath 'com.stanfy.spoon:spoon-gradle-plugin:1.0.2'
        }
}

allprojects
        {
        repositories
                {
                    mavenCentral()
                }
    }

(2)

 apply plugin: 'com.android.application'
apply plugin: 'newrelic'
apply plugin: 'spoon'
//apply plugin: 'jacoco' // Not working at the moment

android {
    compileSdkVersion 21
    buildToolsVersion '23.0.1'
    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 21
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
            debuggable false
            jniDebuggable false
        }
        debug {
            debuggable true
            testCoverageEnabled = false
        }
    }
    productFlavors {
        standard
        motorola
        honeywell
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    sourceSets {
        main {
            java.srcDirs = ['src/main/java']
}
    }
    packagingOptions {
        exclude 'LICENSE.txt'
    }
}

dependencies {
    compile 'com.android.support:support-v4:23.0.1'
    compile 'com.newrelic.agent.android:android-agent:5.+'

    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:recyclerview-v7:23.0.1'
    compile 'com.android.support:percent:23.0.1'


    compile files('libs/redlasersdk.jar')
    provided files('libs/com.symbol.emdk.jar') // Assuming the build does not need symbols compiled
    standardCompile files('libs/com.symbol.emdk.jar')
    // Compiling the EMDK symbols for non-motorola flavors
    honeywellCompile files('libs/com.symbol.emdk.jar')
    // Compiling the EMDK symbols for non-motorola flavors
    compile files('libs/honeywell.jar')

   spoon {
    debug = true
}

 apply from: "../artifacts.gradle" 

Edit 1 : Everything in the SDK manager is up to date.

Sebek
  • 642
  • 8
  • 22
  • Have you installed the latest design library 23.0.1 via the SDK manager? – Prexx Sep 29 '15 at 08:59
  • Yes I have. Everything in the SDK manager is up to date. – Sebek Sep 29 '15 at 08:59
  • Yes otherwise the gradle sync would fail – Tim Sep 29 '15 at 09:00
  • 1
    compileSdkVersion 23 – NaviRamyle Sep 29 '15 at 09:04
  • Use `android.support.v7.widget`, `Widget.Material` is for minimum of SDK 21 only – NaviRamyle Sep 29 '15 at 09:08
  • @NaviRamyle Ok, switching to `compileSdkVersion 23` did something. I'm no longer getting that error. However it still won't build I'm getting random errors throughout the project like `Error:(19, 30) error: package org.apache.http.entity does not exist` . – Sebek Sep 29 '15 at 09:17
  • @Sebek oh yes, on sdk 23 sadly some of org.apache.http.* is now deprecated :( – NaviRamyle Sep 29 '15 at 09:21
  • @NaviRamyle I see, either way, this is not the issue I posted for. Thanks for your help! :D Maybe you can post your comment as an answer so I can accept it and give you credit? – Sebek Sep 29 '15 at 09:31

1 Answers1

1

Use compileSdkVersion 23

Addition

Use android.support.v7.widget, Widget.Material is for minimum of SDK 21 only

NaviRamyle
  • 3,967
  • 1
  • 31
  • 49