Bug 46782 - aapt execution fails to include resourcecache items
Summary: aapt execution fails to include resourcecache items
Status: RESOLVED DUPLICATE of bug 45137
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 7.0 (C8)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2016-11-10 23:53 UTC by Jon Douglas [MSFT]
Modified: 2016-11-11 21:37 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Jon Douglas [MSFT] 2016-11-10 23:53:45 UTC
*Description:

Within the "Aapt" task, it is failing to include `resourcecache` items which are known to house items like the "Android Support Library". Because of this, these resources are not included to the `resource.designer.cs` and thus fails at build time trying to resolve these resources.

EX: 

	Resources/values/styles.xml(2): error APT0000: No resource found that matches the given name: attr 'windowNoTitle'.
	Resources/values/styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.
	Resources/values/styles.xml(2): error APT0000: No resource found that matches the given name: attr 'colorAccent'.
	Resources/values/styles.xml(2): error APT0000: No resource found that matches the given name: attr 'colorPrimary'.
	Resources/values/styles.xml(2): error APT0000: No resource found that matches the given name: attr 'colorPrimaryDark'.
	Resources/values/styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.
	Resources/values/styles.xml(2): error APT0000: No resource found that matches the given name: attr 'colorPrimaryDark'.
	Resources/values/styles.xml(2): error APT0000: No resource found that matches the given name: attr 'windowNoTitle'.

I have narrowed this behavior down to only the following:

Current Beta Channel at time of writing

Xamarin Studio(Mac) - 6.1.2(build 44)  

Xamarin.Android - 7.0.2.38

*Reproduction:

1. Download https://github.com/xamarinhq/app-acquaint

2. Be on the current Stable channel

 Xamarin Studio 6.1.1
 Xamarin.Android 7.0.1.3

3. Notice that aapt executes normally. Here's a gist of arguments to the "Aapt" task:

https://gist.github.com/JonDouglas/957229b6d2d439e93c8d8c39855c23b3

Now we test the current Beta

1. Download https://github.com/xamarinhq/app-acquaint (If you don't already have it)

2. Be on the current Beta channel

Xamarin Studio - 6.1.2(build 44)  
Xamarin.Android - 7.0.2.38

3. Notice that aapt does not include any `resourcecache` items in the command like it did with Stable

https://gist.github.com/JonDouglas/5b26b288eb58d7ccc2fa7a4f9a008ab7

Just from a quick diff, we can see the following:

-S "/Users/jondouglas/Downloads/app-acquain
t-master 2/App/Acquaint.Native/Acquaint.Native.Droid/obj/Debug/resourcecache/B16ADF1C9786C18C7414E49
B303429F5/res" -S "/Users/jondouglas/Downloads/app-acquaint-master 2/App/Acquaint.Native/Acquaint.Na
tive.Droid/obj/Debug/resourcecache/D765EC60A1F59712A89607B877E258A1/res" -S "/Users/jondouglas/Downl
oads/app-acquaint-master 2/App/Acquaint.Native/Acquaint.Native.Droid/obj/Debug/resourcecache/9B0ED7A
8E09A4293D98DACA07BE500B9/res" -S "/Users/jondouglas/Downloads/app-acquaint-master 2/App/Acquaint.Na
tive/Acquaint.Native.Droid/obj/Debug/resourcecache/C851EC9C63B337055DD9A9B4F4532CDF/res" -S "/Users/
jondouglas/Downloads/app-acquaint-master 2/App/Acquaint.Native/Acquaint.Native.Droid/obj/Debug/resou
rcecache/A9E66B6F97F581180F3CCEE6C7FA1945/res" -S "/Users/jondouglas/Downloads/app-acquaint-master 2
/App/Acquaint.Native/Acquaint.Native.Droid/obj/Debug/resourcecache/F81A9FD534B47B7B9E061082CCD6A2AF/
res" -S "/Users/jondouglas/Downloads/app-acquaint-master 2/App/Acquaint.Native/Acquaint.Native.Droid
/obj/Debug/resourcecache/B4AF73624C2AEADEA417AF30BDA03794/res" -S "/Users/jondouglas/Downloads/app-a
cquaint-master 2/App/Acquaint.Native/Acquaint.Native.Droid/obj/Debug/resourcecache/DB8F0009E78C5B073
11E526574BD94B9/res" -S "/Users/jondouglas/Downloads/app-acquaint-master 2/App/Acquaint.Native/Acqua
int.Native.Droid/obj/Debug/resourcecache/DE19E98769257A842C63D3990DC245B3/res"

Thus the current Beta channel "Aapt" task seems to fail somewhere and not include these items.
Comment 1 Dan Rigby 2016-11-11 00:23:37 UTC
I'm seeing the same behavior on the Acquaint App.

Build Output from current stable channel:
https://gist.github.com/DanRigby/4044b961942c015f4c9030e430531e65

Build Output from current beta channel:
https://gist.github.com/DanRigby/28a94ccd067fd36ab8f668713a8b59dd
Comment 2 Alessandro 2016-11-11 09:13:09 UTC
Jon have you a workaround??
Comment 3 Alessandro 2016-11-11 09:14:19 UTC
Jon have you a workaround??
Comment 4 Jon Douglas [MSFT] 2016-11-11 16:32:39 UTC
@Alessandro This bug is most likely a duplicate of: https://bugzilla.xamarin.com/show_bug.cgi?id=45137

Looks like it will be fixed in C8SR1 which hopefully will be released soon.

*** This bug has been marked as a duplicate of bug 45137 ***
Comment 5 Alessandro 2016-11-11 17:03:50 UTC
@Jon, If I switch to Visual Studio do I have the same problem?
Comment 6 Jon Douglas [MSFT] 2016-11-11 17:18:42 UTC
No you will not. I believe a fix is coming later today to XS. Hold your head up!
Comment 7 Alessandro 2016-11-11 19:41:37 UTC
@Jon, I'll not sleep. Can you inform me about the fix?
Thanks
Comment 8 Dan Rigby 2016-11-11 21:24:28 UTC
@Alessandro, the final build of C8SR1 was just pushed to the Stable and Beta channels which fixes this issue.

https://releases.xamarin.com/stable-release-cycle-8-service-release-1/
Comment 9 Alessandro 2016-11-11 21:37:57 UTC
Thanks @Jon! I try.
Which one? Stable or Beta?

Note You need to log in before you can comment on or make changes to this bug.