Xamarin Forms error while recording animation R $ anim.class

Hi, I am updating the visual studio 2017 15.5 community when debugging. I have this error.

obj\Debug\android\src\android\support\compat\R.java:11: error: error while writing anim: obj\Debug\android\bin\classes\android\support\compat\R$anim.class (El proceso no tiene acceso al archivo porque estβ”œΓ­ siendo utilizado por otro proceso) 3> public static final class anim { 3> ^ 3> Note: Some input files use or override a deprecated API. 3> Note: Recompile with -Xlint:deprecation for details. 3> Note: Some input files use unchecked or unsafe operations. 3> Note: Recompile with -Xlint:unchecked for details. 3> 1 error 
+8
xamarin xamarin.android xamarin.forms
source share
5 answers

EDIT: this error should be fixed now if you are upgrading to Visual Studio version 15.5.2 https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes#15.5.2 "Release Date : December 14, 2017 - Visual Studio 2017 version 15.5.2 version. The best releases fixed in this version. These are the problems reported by clients in this release:

The Xamarin Android project cannot be created because R $ anim.class is used.

Short answer

1- Open the task manager and run the operation MSBuild.exe.

2- If 1 did not work, close and reopen Visual Studio 2a. Also make sure you close the emulator. (Change)

The longer answer is

Ive sometimes started getting the same build errors as some of the variations "The Xamarin Android project cannot be created because R $ anim.class is used"

I look at it, and it looks like this is a fairly recent problem that they encountered after the release of Xamarin Android 15.5. Heres is a link to the stream where an error is reported and actively processed. As of the time of this email, a fix has not yet been clicked, but there is a quick fix that worked for me. https://developercommunity.visualstudio.com/content/problem/155693/xamarin-android-project-cannot-build-because-ranim.html

It seems that the problem is somehow related to MSBuild processes. Open the task manager and run the MSBuild.exe operation.

After that, perhaps clean and rebuilt, the android emulator seems to work. If that doesn't work, closing and reopening VS seems to do the trick. But first I will try the task manager, this may be a faster way to fix the error.

Edit - I also close the emulator while I run my visual studio. I may be wrong about this, but it looks like it continues to make additional instances of MSbuild.exe and needs a good close and restart.

+11
source share

I can confirm that I see the same error after updating VS2017 15.5. It looks like this question was filed with Xamarin support here .

I am running a Xamarin Forms application. Although rebooting VS seems to fix the problem, I can't deploy it in debug mode. Even after a reboot, when the application is deployed / launched to a device or emulator, it is immediately reset. However, the application can be launched in release mode successfully.

Continuation of the search for a fix. At the same time, create a new VM with the 15.4 version of VS (available for download here ).

+1
source share

Removing the obj folder inside the project and restarting the fix for the problem. But it keeps coming back every time I add a folder to Resources or something like that

+1
source share

The same thing, always problems when xamarin / ms releases a new version :-( Restarting VS helps for a while ...

0
source share

Have you solved your problem? Restarting VS will help though .. strange error

0
source share

All Articles