While going to build the .Driod project of Xamarin forms got "The "Javac" task failed unexpectedly"

ShubhoShubho USMember ✭✭
edited May 2016 in Xamarin.Forms

Due to version conflict I did Uninstall and then Reinstall all of the NuGet Packages in .Droid and Portable project accordingly.
The version conflict error is gone but get 1 error :
[
The "Javac" task failed unexpectedly. System.UnauthorizedAccessException: Access to the path 'C:\Users\a585113\Documents\Visual Studio 2015\Projects\WeatherApp4\WeatherApp4\WeatherApp4.Droid\obj\Debug\android\src\mono\android\support\v7\internal' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator1.AddSearchableDirsToStack(SearchData localSearchData) at System.IO.FileSystemEnumerableIterator1.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at Xamarin.Android.Tasks.Javac.GenerateResponseFile()
at Xamarin.Android.Tasks.Javac.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
]

How to resolve it?

Attached The Screen shot below, click on icon to check.

Best Answer

Answers

  • MaharshiChoudhuryMaharshiChoudhury INMember ✭✭✭

    Check the path in your system C:\Users\a585113\Documents\Visual Studio 2015\Projects\WeatherApp4\WeatherApp4\WeatherApp4.Droid\obj\Debug\android\src\mono\android\support\v7\internal

  • coolrjmcoolrjm INMember ✭✭✭

    When you were prompted to restart Visual Studio after updating the Nuget packages did you exit Visual Studio or just closed the project and reopened the same. Please exit Visual Studio and any other instances completely and then reopen and start afresh.

    Or try cleaning out the bin and obj folders and try rebuilding again.

  • ShubhoShubho USMember ✭✭

    it's done, thank you guys for your suggestions, deletion of obj & bin folders resolve the issue. :-)

  • BaqerNaqviBaqerNaqvi USMember ✭✭

    I had the same problem, I had a very long folder hierarchy to the solution folder. Try moving your project to some root folder.

Sign In or Register to comment.