Forum Visual Studio

Can't get simple Android app running on Visual Studio

I'm trying to get Visual Studio 2012 running on Windows 8 and using Xamarin. My android sdk is installed and identified in Visual Studio 2012. Xamarin account is verified. I have administrator privileges on the PC.

When I try to build the generic Android Application (Hello World) that comes as a default template I get the following error:

Access to the path 'resources.apk.bk' is denied.

When I rebuild I get the above error plus

The directory is not empty.

I've search around for this a lot. I'm going to post to stackOverflow but thought you might be able to help.

In addition I get the following warnings: Could not find schema information for the element 'manifest'.
Could not find schema information for the element 'uses-sdk'.
Could not find schema information for the element 'application'.

Trying to build good projects from my colleagues yield similar results.

More verbose listing of build is as follows:
1>------ Rebuild All started: Project: AndroidApplication3, Configuration: Debug Any CPU ------
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(765,2): error : Access to the path 'resources.apk.bk' is denied.
1> AndroidApplication3 -> c:\users\erin\documents\visual studio 2012\Projects\AndroidApplication3\AndroidApplication3\bin\Debug\AndroidApplication3.dll
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1094,3): error : The directory is not empty.
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1094,3): error :
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========


  • Had a problem alike yours, but with Android Studio.
    Go to Control Panel - System - Advanced System Settings - Advanced
    Click Environment Variables -> click "New..." -> Write a name like JDK_HOME and add the path to the Java SDK folder.

    Having Admin rights on a Windows 8 machine doesn't always mean you have rights to everything...

  • A colleague notice that the build succeeded. For now I'm ignoring these errors but still haven't figured it out. Able to deploy to device but not yet able to do so to an emulator. Weird.

  • SudhirMannSudhirMann USMember
    edited February 2014

    Right click the Project and click properties. Check the Compile using Android version it should be less or equal then your Android API version.

  • StephenFeestStephenFeest GBMember

    I recently started getting this error on approximately 4 out of every 5 build attempts. In my case the 'on access' AVG AntiVirus scanner was to blame; disabling it stopped the errors from happening.

  • ClayBrinleeClayBrinlee USMember ✭✭
    edited August 2018

    @StephenFeest I've tried adding inclusions to this file and different folders. I'm done so much research trying to figure out how I can fix it but I end up disabling McAfee every time and this is the only fix. McAfee also causes issues installing Nuget packages sometimes too. It's unfortunate that as a developer I have to consistently have an unsecured PC at least when developing in Xamarin.

Sign In or Register to comment.