Android Studio Exports Strings From Support Library To APK
Recently i switched from Eclipse to Android Studio. I have a project with multiple module dependencies. One dependency is the support library appcompat, included like this: depende
Solution 1:
At code.google.com they say that the gradle plugin has a option to restrict resources, since version 0.7.0 is released.
Note at version 0.7.0 Release notes:
New option on product Flavor (and defaultConfig) allow filtering of resources through the -c option of aapt
- You can pass single value (resConfig) or multiple values (resConfigs) through the DSL.
- All values from the default config and flavors get combined and passed to aapt.
- See "basic" sample.
Here is some sample code to put in the build.gradle file of your project:
android {
defaultConfig {
resConfigs "en", "de", "es" //Define languages that your app supports.
}
}
I spent a lot of time to find the "Basic sample"...could be a link in the release notes :/ so there are the links:
NOTE: Version 0.7.x requires Android Studio 0.4.+ and Gradle 1.9.
Solution 2:
Xamarin.Android solution may help someone facing this problem. Problem occurs also if you use Google Play Services. Add the following to Android project .csproj with supported app languages
<PropertyGroup>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidAapt2LinkExtraArgs>-c de,el,es,fr,it</AndroidAapt2LinkExtraArgs>
</PropertyGroup>
Post a Comment for "Android Studio Exports Strings From Support Library To APK"