首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android设计支持库的实现困难

Android设计支持库的实现困难
EN

Stack Overflow用户
提问于 2015-09-29 08:56:08
回答 1查看 206关注 0票数 1

我一直试图实现Android的设计支持库,但没有成功。我遵循了这里的步骤。在Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (xxx) and test app (xxx) differ.出了几个问题之后,我设法解决了这个问题。然而,现在我收到了一个新的错误:

我会在下面张贴我的.gradle文件,也许你们可以帮助我。我拿出了导致初始警告的单元测试和仪器测试的所有内容。

(1)

代码语言:javascript
复制
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)

代码语言:javascript
复制
 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" 

编辑1: SDK管理器中的所有内容都是最新的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-09-29 09:34:53

使用compileSdkVersion 23

加法

使用android.support.v7.widget,Widget.Material仅适用于SDK 21的最小值

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32839817

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档