-1

Windowa 10 Visual Studio 2017 v15.9.7

Hi all, I have a Xamarin.Forms solution targetting Pie and a minimaum version of Ice Cream Sndwich.. I am having trouble building the Android project.

After getting the error Java Exit Code 2 I have gone down the route of enabling the Multi-Dex option and have followed this article........ https://riptutorial.com/xamarin-android/example/29859/enabling-multidex-in-your-xamarin-android-apk

Now I've seen that some people have issues with this when there are spaces or special characters in their SDK location path but my problem is slightly different.

I have an apostrophe in my user name and thus, an apostrophe in my user folder. My error points at this folder. I've spent hours trying to sort it and my current tactic was to start a new project and add in the NuGet packages one at a time, building after each one, to see when the error occurs in the new project.

It seems that once I added in SkiaSharp.Views.Forms the error begins to occur. If I remove it, the problem goes away. I'm sure tha same can be said for other packages also as per my main project but this is how far I get on the test before the error occurs.

Renaming my user folder is not an option. My user folder is c:\User\Anthony.D'Cruze. Here is the error I am getting....

1>"D:\ANTHONY\ANDROID\PushMessaging\FCMClient\FCMClient.csproj" (Build;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) ->
1>(_CompileToDalvikWithDx target) -> 
1>  CREATEMULTIDEXMAINDEXCLASSLIST : error : Expecting class path separator ';' before 'Cruze\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0\embedded\classes.jar'' in argument number 2
1>

I'm concluding that it must be an issue with the apostrophe in my name. Rather than curse my parents for the surname, I'd much rather find a work around. I was thinking of using a symbol link for my user folder, but that has the potential to mess my pc up to a point where I can't even login, so that will be a last resort if I cannot find a solution elsewhere.

Anyone else experience this.

AntDC
  • 1,807
  • 14
  • 23
  • Have you tried to build the code with a different Mac/PC or as a different user? When did the occur start happening, what was the exact changes you made before which the error started occuring, or has it never built on your computer – Saamer Jun 14 '19 at 16:24
  • 2
    As with most tooling, special characters do not play well, especially when tooling needs to be invoked on the command line. I would recommend that you create a user with no special characters / spaces / etc. Secondly, you have a v23 version of support libraries, that is really old and should be updated. v28 is the current stable for comparison. – Jon Douglas Jun 16 '19 at 00:15
  • A cooleague has been able to build. – AntDC Jun 17 '19 at 06:58

1 Answers1

0

OK - this far from ideal but has solved my problem. Basically I have had to have a new profile set up without the apostophe in my name. Working for a big corporate, this is a pain. Et voila - It builds.

I'm sure there must have been a more suitable solution but it certainly evaded me.

I hoped I could use some kind of symbolic link for the relevent path variable but I couldn't be sure what var and where to set it.

If anone comes accorss this and has a more elegant solution (any would be) please post it here.

AntDC
  • 1,807
  • 14
  • 23