Gradle无法找到主题

时间:2017-06-30 12:09:53

标签: android gradle

我想在我的Android项目中简单地构建第二个模块。我已经提到了另一个模块,因为我想要重用一些活动和类。这是我的build.gradle

apply plugin: 'com.android.application'

android {

    compileSdkVersion 19
    buildToolsVersion '25.0.0'
    defaultConfig {
        applicationId "nl.minerall.sapphire.browser"
        minSdkVersion 19
        targetSdkVersion 19
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    compileOptions {
    }

    lintOptions {
        disable "MissingTranslation"
        checkReleaseBuilds false
    }
}

dependencies {
    compile 'com.android.support:support-v4:19.1.0'
    compile project(path: ':sapphirelib')
    compile project(path: ':app')
}

build.gradle的{​​{1}}是:

sapphirelib

apply plugin: 'com.android.library' android { compileSdkVersion 24 buildToolsVersion '25.0.0' defaultConfig { minSdkVersion 19 targetSdkVersion 24 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']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) testCompile 'junit:junit:4.12' compile files('libs/simple-xml-2.7.1.jar') compile project(path: ':Zebra_SDK_DS3678') }

app

当我构建时,我收到错误

  

错误:(3)检索项目的父项时出错:找不到与给定名称匹配的资源' android:Theme.Material.Light.NoActionBar'。

我被扔进一个显然是自动生成的apply plugin: 'com.android.application' android { signingConfigs { demo { keyAlias 'FlexDemo' keyPassword '******' storeFile file('/path/to/file.jks') storePassword '******' v2SigningEnabled false } full { keyAlias 'PocketFull' keyPassword '****' storeFile file('/path/to/file.jks') storePassword '*****' v2SigningEnabled false } } compileSdkVersion 19 buildToolsVersion '25.0.0' defaultConfig { applicationId "nl.minerall.sapphire.pocket" minSdkVersion 19 targetSdkVersion 19 } productFlavors { full { applicationId "nl.minerall.sapphire.pocket.full" signingConfig signingConfigs.full resValue "string", "app_name", "Sapphire Pocket" versionCode 13 versionName "Flex 2.0.25" } demo { applicationId "nl.minerall.sapphire.pocket.demo" signingConfig signingConfigs.demo resValue "string", "app_name", "Pocket Demo" versionCode 12 versionName "Flex 1.13 DEMO" } ipsdemo { applicationId "nl.minerall.sapphire.pocket.ipsdemo" signingConfig signingConfigs.demo resValue "string", "app_name", "Pocket IPS Demo" versionCode 12 versionName "Flex 1.13 IPS DEMO" } sourceSets.ipsdemo.root = "src/demo" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } compileOptions { } lintOptions { disable "MissingTranslation" checkReleaseBuilds false } } dependencies { compile 'com.android.support:support-v4:19.1.0' compile project(path: ':sapphirelib') } 文件中。我使用的values-v21.xml是:

styles.xml

<resources> <!-- Base application theme. --> <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> </resources> 来自......

,这完全胜过我

0 个答案:

没有答案