我创建了一个基于productFlavors的免费和专业版本项目,并为不同版本使用不同的字符串资源文件,文件夹结构如下所示:cc.png。
如果我在面板中更改Build Variant,Android选项卡中显示两个strings.xml(2)数值,一个位于主文件夹中,另一个位于免费或专业文件夹中,你可以看到aa.png和bb.png。
我希望所有字符串资源文件都可以一起显示,这将显示三个string.xml(3),第一个位于主文件夹中,第二个位于免费文件夹中,第三个位于专业文件夹中。我该怎么做?谢谢!
CC.Png
AA.png
BB.png
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "info.dodata.messagecleanup"
minSdkVersion 9
targetSdkVersion 22
versionCode 7
versionName "1.07"
archivesBaseName = "MessageCleanup-V" + versionName
}
productFlavors {
free {
applicationId "info.dodata.messagecleanup"
buildConfigField "String", "AppName", "\"Message Cleanup\""
}
pro {
applicationId "info.dodata.messagecleanup.pro"
buildConfigField "String", "AppName", "\"Message Cleanup Pro\""
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.google.android.gms:play-services:7.3.0'
}