Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 3130 [details]
Screenshot with error
When editing an existing xml-drawable that is currently or recently was in use by a view, I get the following error when trying to save my changes: http://tinypic.com/m/fw2hiv/2 (or see attachment)
Steps to Reproduce:
- start a new android application solution
- create a new xml-drawable, save and attach to a view in your layout.axml
- make some changes in the drawable.xml
8/10 times I get the above mentioned exception, sometimes I also get the same exception when trying to delete such a file.
A fix I found was to unlock the files using unlocker (http://tinypic.com/m/fw2hk9/2)
but when fine-tuning a stroke or an alpha-value, it's quite a nuisance to go through so many steps.
Mono is up to date, I'm on Windows7.
Running Windows 8
Version info see below.
I can reproduce this error even after a system reboot and having NO layout's or other drawables open (or opened), after MonoDelelop startup, that use the drawable.xml in question.
It seems to only happen with XML drawables defining a <layer-list>.
<shape> and <selector> drawables seem to work fine.
Most of the time I'm able to save the drawable once or twice before the error appears.
Because of this I've started editing drawables in an other editor.
Installation UUID: 015541ff-3550-4c36-a07d-053f90cf42a7
Microsoft .NET 4.0.30319.18033
Mono for Android: 4.4.54
Android SDK: C:\Users\...\AppData\Local\Android\android-sdk
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.1 (API level 16)
4.2 (API level 17)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_31
No build info
Windows 6.2.9200.0 (64-bit)
I'm also getting this error in Xamarin Studio/MonoDevelop 4.0. It's happening with <shape> as well as <layer-list>. Using Windows 7.
*** Bug 10625 has been marked as a duplicate of this bug. ***
*** Bug 5601 has been marked as a duplicate of this bug. ***
*** Bug 5262 has been marked as a duplicate of this bug. ***
*** Bug 6790 has been marked as a duplicate of this bug. ***
It turns out that the Android SDK is not explicitly closing resource files after parsing them. This seems to be fixed in Jelly Bean, although we have not yet integrated the Jelly Bean layout renderer yet (the sdk api has many changes, so it requires new important integration work). And even if we did the files would still be locked when choosing a framework other than Jelly Bean to display the layout in the designer.
This problem can also reproduced in Eclipse, although it doesn't happen so often there, I guess because the garbage collector is running more often. I've now added code to run the garbage collector more often and that seems to solve the problem (although there is no guarantee that it will always work). Right now that's all I can do since we depend on the Android SDK behavior here.
Today with the latest builds:
This issue does not exist, as now the exception does not appear when edit the layout axml file.
Hence, closing this issue.