*Description*:
I have started using the "shrinkResources true" android gradle feature and
I am experiencing the following exception:
```
* Caused by: java.io.FileNotFoundException: res/layout/screen_home.xml*
* at android.content.res.AssetManager.openXmlAssetNative(Native
Method)*
* at
android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:488)*
* at
android.content.res.Resources.loadXmlResourceParser(Resources.java:2338)*
* at
android.content.res.Resources.loadXmlResourceParser(Resources.java:2311)*
* at android.content.res.Resources.getLayout(Resources.java:939)*
* at
android.view.LayoutInflater.inflate(LayoutInflater.java:395)*
* at
com.couchsurfing.mobile.ui.ScreenConductor.inflateLayout(ScreenConductor.java:226)*
```
I am using a custom annotation to reference this specific layout:
```
*@Layout(R.layout.screen_home)*
*```*
Find below the sample of code I am using to inflate the layout
```
* /** Create an instance of the view specified in a {@link flow.Layout}
annotation. */*
* private static android.view.View createView(Context context, Class<?>
screenType,*
* ViewGroup container) {*
* Layout screen = screenType.getAnnotation(Layout.class);*
* if (screen == null) {*
* throw new IllegalArgumentException(*
* String.format("@%s annotation not found on class %s",
Layout.class.getSimpleName(),*
* screenType.getName()));*
* }*
* int layout = screen.value();*
* return inflateLayout(context, layout, container);*
* }*
* private static android.view.View inflateLayout(Context context, int
layoutId,*
* ViewGroup container) {*
* return LayoutInflater.from(context).inflate(layoutId, container,
false);*
* }*
```
*Env*:
Android Gradle: 0.14.1
Gradle: 2.1
buildToolsVersion "21.0.1"
*build.gradle sample*:
minifyEnabled true
proguardFile file('proguard-debug.cfg')
shrinkResources true
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.