In VS2013 when I click project popup menu to edit user interface files in Android Studio I can see Android Studio open and I can edit UI files and save them but when I rebuild the project in VS2013 I get following error
Error 1 (Android) Resource entry main is already defined.
res\layout\main.layout-xml:0: Originally defined here.
res\layout\main.xml___jb_old___ 0 1
I’m getting this problem now with Visual Studio 2015 Update 3 and Android Studio 2.2.3 on Windows 7, using Elements 9.0 (and also with 8.4).
After modifying res\layout\main.xml and res\values\strings.xml, Android Studio generates two files with the same name and extension ended in ___ jb _ tmp ___.
I can see main.xml___jb_tmp___ and strings.xml___jb_tmp___ from within Android Studio, but they are not shown in Visual Studio. They are hiddenly copied to the proyect, and they are the cause of errors like: “(Android) Resource entry xxx is already defined” and “(Android) Originally defined here”.
I’ve found a possible workaround: Tell Android Studio to not generate this temporary files.
To do this: Click on “File Menu” --> “Settings”. Go to “Appearance & Behaviour” --> “System Settings”, and uncheck “Use safe write (save changes to a temporary file first)”