I hope I added it at the right place:
https://code.google.com/p/android/issues/detail?id=78649&thanks=78649&ts=1415056388

Thanks Xavier for looking into it.

On Monday, November 3, 2014 3:04:14 PM UTC-8, Xavier Ducrohet wrote:
>
> Could you file a bug? thank you.
>
> On Mon, Nov 3, 2014 at 2:59 PM, Nicolas Milliard <[email protected] 
> <javascript:>> wrote:
>
>> *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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
> http://developer.android.com | http://tools.android.com
>
> Please do not send me questions directly. Thanks! 
>

-- 
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.

Reply via email to