Hi,
I am trying to build the Google Play Services Sample App that comes with the Xamarin.Android Google Player Services Component. Specifically, the "Simple" sample which displays a map.
When I build this sample I get the following error:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB4018: The "GenerateJavaStubs" task failed unexpectedly. System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. at System.IO.PathHelper.GetFullPathName() at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetFullPathInternal(String path) at System.IO.Path.GetFullPath(String path) at Xamarin.Android.Tasks.GenerateJavaStubs.Run() at Xamarin.Android.Tasks.GenerateJavaStubs.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() (MSB4018) (GooglePlayServicesApp)
I have made no changes to this project.
I am not sure which path is is complaining about, but I suspected it might be related to the location of the Android SDK, so I checked and its full path is only about 100 characters.
Thanks!
Matt
Note: I am able to run the other Sample that comes with that component; the "Advanced" Sample called "MapsAndLocationsDemo".
Posts
I have the same problem.
Me too, please help.
Hi , faustino bautista
please change folder path
into specific drive
after reopen the solution
it is working for me
The solution for me was also to shorten the project path. You can do that by renaming your project or moving.