I create a project with free and pro edition based productFlavors, and use different string resource file for different edition, the folders construction is cc.png.
If I change Build Variant in panel, the values in Android tab display two strings.xml(2), one is located main folder, another is located free or pro folder, you can see aa.png and bb.png.
I hope that all string resource files can be displayed together, it will display three string.xml(3), first is located main folder, sencond is located free folder, third is located pro folder. How can I do that ? Thanks!
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'
}
Unfortunately the Android project pane view does not support this behavior. The Android view was specifically designed to show the state of your project for a given build variant, not across all variants.
As you have already discovered, the easiest way to see your resources in all available configurations is to use the "project" view instead of the "Android" view.
You are also free to file a feature request on the Android issue tracker for the option to show the resources available across all variants.
You can define custom scopes within IntelliJ / Android Studio, that display specific folders/files:
You can then select that custom scope from the scope drop-down selector:
That said, I think the more efficient way of navigating between the string files is to hit the "Search Everywhere" hotkey, type "strings.xml", and select the one you want:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With