Android Gradle找不到主题
我试图在我的Android项目中简单地构建第二个模块。我提到了另一个模块,因为我想重用一些活动和类。这是我的Android Gradle找不到主题,android,gradle,Android,Gradle,我试图在我的Android项目中简单地构建第二个模块。我提到了另一个模块,因为我想重用一些活动和类。这是我的build.gradle: apply plugin: 'com.android.application' android { compileSdkVersion 19 buildToolsVersion '25.0.0' defaultConfig { applicationId "nl.minerall.sapphire.browser"
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')
}
sapphirelib
的build.gradle
是:
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')
}
和应用程序的
:
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')
}
当我构建时,我会得到错误
错误:(3)检索项的父项时出错:未找到与给定名称“android:Theme.Material.Light.NoActionBar”匹配的资源
我被扔进一个显然是自动生成的values-v21.xml
文件中。我使用的style.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>
@颜色/原色
@颜色/原色暗
@颜色/颜色重音
android:Theme.Material.Light.NoActionBar的来源完全让我无法理解…显示另外两个build gradle文件,如果您需要该资源,请增加编译器DK。。。它不必与targetSdk@cricket_007我不一定要使用那个资源。
app
和sapphirelib
都编译得很好,直到我添加了sapphirebrowser
模块。我现在已经提出了compileSdk
,我得到了另一个错误…好的,那个错误是什么?其次,简单xml不需要JAR<代码>编译组:'org.simpleframework',名称:'simplexml',版本:'2.7.1'@cricket\u 007另一个错误是找不到颜色。我从styles.xml
中删除了它,现在它已经运行过了。我正在慢慢地到达那里……:)