Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
If the path to the Android SDK contains a space and the option for multi-dex is on for a project, the build fails with:
CREATEMULTIDEXMAINDEXCLASSLIST : error : "part_of_path_before_the_space" (The system cannot find the file specified).
Please tell me which path and where I need to put quotes around so that I can fix it in the mean time.
I have tried to reproduce this issue but not able to reproduce this. Please refer the screencast : http://www.screencast.com/t/Q1As72yykpZ
Could you please have a look on the above screencast and let me know if I missed anything to reproduce this issue along with your complete environment info, Ide logs and build output.
You can get environment info via 'Help > About > Show Details > Copy Info and paste it here' and Ide logs via 'Help > Open Log Directory and get the latest Ide logs'.
Environment Info :
=== Xamarin Studio ===
Version 5.9.5 (build 9)
Installation UUID: 1acc211c-3883-4e33-b4d2-ad3b5d55c2c8
Microsoft .NET 4.0.30319.18449
GTK+ 2.24.22 (MS-Windows theme)
=== Xamarin.Android ===
Version: 5.1.5 (Enterprise Edition)
Android SDK: D:\Backup_OldMachine\D Drive\SDK\SDK\android-sdk
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
5.1 (API level 22)
Java SDK: C:\Program Files\Java\jdk1.7.0_67
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
=== Xamarin Android Player ===
=== Build Information ===
Release ID: 509050009
Git revision: b99cb19a1d3b15d8980c4616f13f837457e5b292
Build date: 2015-07-28 02:41:02-04
Xamarin addins: d53d6eceb828422f3d4aff8547f2f6bab6c9ea58
=== Operating System ===
Windows 6.2.9200.0 (64-bit)
Xamarin 3.11.666.0 (ebae43a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android 22.214.171.124 (5f55a9ef61c11b6ce0890bc91e4c71b1b92be214)
Visual Studio plugin to enable development for Xamarin.Android.
Xamarin.Forms Intellisense 1.0
Provides intellisense for Xamarin.Forms in the XML editor.
Xamarin.iOS 126.96.36.199 (67b390d0d1bd741582cf7b7fd3ffea08583a3f83)
Visual Studio extension to enable development for Xamarin.iOS.
Xamarin.iOS Unified Migration 1.0
Automated migration for Xamarin iOS Classic projects to Unified
Early preview of Xamarin Test Cloud integration
My Xamarin is a little older than yours, could that be the problem?
Also, which one is your OS? Mine is Windows 7 64-bit.
Oh, you pasted your Windows version. Never mind.
Could you provide the full diagnostic output of the build please, it will help us track down the exact issue.
No, I cannot provide it. Your Bugzilla completely refuses to accept the log and so do PasteBin and Pastie. I am also not happy at all that my comment about the difference in versions was completely ignored, especially given that I worked around it by putting single quotes around "ToolPath" in <CreateMultiDexMainDexClassList ... />. To begin with, I find it extremely hard to believe you could not reproduce it. Anyway, this bug is not a problem to me any more. Fix it, if you wish.
The workaround only works for building, not deploying. Fix this or tell me how to work around it.
There have been no replies for hours now. This bug blocks my work. Get your act together and fix it.
Sorry for the delay. The most direct work around at this time would be to move your android-sdk and android-ndk to a location which does not contain a space, and then update Visual Studio/Xamarin Studio to use the new locations. Personally I tend to keep those sdks in c:\Android\ as there are known issues on windows and long path names.
In the mean time we will continue to investigate this issue, the "workaround" of adding quotes to the .targets file would probably not fix all the issues that might arise, we will need to investigate the various Tasks and make sure we update all the locations where this would be a problem. So the chances are other than moving the sdks there is no quick fix as we probably need to change the actual code rather than the .targets file.
So I will investigate this issue, but in the mean time I would recommend moving your sdk installations to a place with no spaces in the path that should enable you to continue working.
I cannot move it and this blocks my work. Can I get the source code of the task and fix it myself?
When is this going to be fixed?
I am investigating this issue. Putting the single quotes around the ToolPath did not fix the issue on my development box, so I am having to investigate further. This is going to take some time to figure out and get into a release, I would highly recommend you work around this issue by moving the android ndk and sdks to a location which does not contain a space until we can figure out a way to work around this.
I have virtually the same problem, but I slightly different error message:
CREATEMULTIDEXMAINDEXCLASSLIST : error : Expecting class path separator ';' before '\Android\android-sdk\build-tools\23.0.0\lib\shrinkedAndroid.jar' in argument number 8
My problem has been fixed by doing what was suggested by dean ellis above.
Also, im using V2.* of Xamarin and the bug has still not been fixed.
When are you finally going to fix this?
This bug tripped me up as well even though my SDK path had no spaces in the page, however my project folder did have spaces in it so I removed those as it compiled with multidex enabled.
This is ridiculous, almost a year and Xamarin can't get a fix for this???
Seriously Xamarin, lets stop with the constant marketing releases and fix the "thousand little cuts" bugs that kill developer productivity!!!
I can confirm the same behavior with an Android SDK located in C:\Program Files (x86). Moving this directly to C:\ resolves the issue, but it's less than ideal.
This is unbelievably hacky. There should be a real fix.
I started getting similar error. Even after linking path to root catalog.
Unable to access jarfile C:\android-sdk\tools\proguard"\lib\proguard.jar -injars 'C:\Program RealRider.Droid C:\src\Project\Project-mobile\Project\Project.Droid\CREATEMULTIDEXMAINDEXCLASSLIST
On Visual Studio 2017 RC on Windows 10.
Microsoft Visual Studio Enterprise 2017 RC
Version 15.0.25928.0 D15REL
Microsoft .NET Framework
Installed Version: Enterprise
Architecture Diagrams and Analysis Tools 00369-50000-00000-AA285
Microsoft Architecture Diagrams and Analysis Tools
Visual Basic 2017 RC 00369-50000-00000-AA285
Microsoft Visual Basic 2017 RC
Visual C# 2017 RC 00369-50000-00000-AA285
Microsoft Visual C# 2017 RC
Visual C++ 2017 RC 00369-50000-00000-AA285
Microsoft Visual C++ 2017 RC
Visual F# 4.1 00369-50000-00000-AA285
Microsoft Visual F# 4.1
Application Insights Tools for Visual Studio Package 8.3.01031.3
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2016 15.0.21108.0
ASP.NET and Web Tools 2016
ASP.NET Web Frameworks and Tools 2013 5.2.41027.0
For additional information, visit https://www.asp.net/
Azure App Service Tools v2.9.6 15.0.21107.0
Azure App Service Tools v2.9.6
Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.
Azure Data Lake Tools for Visual Studio 2.2.2250.0
Microsoft Azure Data Lake Tools for Visual Studio
Command Bus, Event Stream and Async Manager Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.
Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Dotfuscator Community Edition 188.8.131.5251-release+7d957f0.20161018.4978
PreEmptive Protection - Dotfuscator CE
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info
Microsoft Azure Hive Query Language Service 2.2.2250.0
Language service for Hive query
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio vNext - v2.9.41028.1
Microsoft Continuous Delivery Tools for Visual Studio 0.1
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
Mono Debugging for Visual Studio Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 4.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Python Tools for Visual Studio 3.0.16301.2
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.
Python Tools for Visual Studio - Cookiecutter Integration 3.0.16301.2
Provides cookiecutter integration.
Python Tools for Visual Studio - Django Integration 3.0.16301.2
Provides templates and integration for the Django web framework.
Python Tools for Visual Studio - Profiling Support 3.0.16301.2
Profiling support for Python projects.
R Tools for Visual Studio 0.5.21102.1525
Provides project system, R Interactive window, plotting, and more for the R programming language.
SQL Server Data Tools 15.1.61101.0
Microsoft SQL Server Data Tools
Hosting json editor into a tool window
TSCPackage Extension 1.0
TSCPackage Visual Studio Extension Detailed Info
TypeScript tools for Visual Studio
Xamarin 184.108.40.206 (290c061)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android 220.127.116.11 (23ad1d8)
Visual Studio extension to enable development for Xamarin.Android.
Xamarin.iOS 10.4.0.1 (7c50b27)
Visual Studio extension to enable development for Xamarin.iOS.
*** Bug 51720 has been marked as a duplicate of this bug. ***
*** Bug 52975 has been marked as a duplicate of this bug. ***
## Bookkeeping note
Comment 18 and Comment 19 are about a slightly different problem . The fix for that issue is included in XamarinVS 18.104.22.1684, Xamarin.Android 22.214.171.124 (9578cdc) and higher .
I will accordingly tag Comment 18 and Comment 19 as obsolete in the context of this bug report.
The symptoms from Comment 0 and Comment 12 remains the focus of this bug report.
It is now coming up to 2 years since this bug was reported and you still are not able to fix it?
How many pomp and circumstance, sugar coated marketing circus events featuring J.M. doing a ToDo app in Xamarin Forms on stage surrounded by monkeys do we have to witness before this bug is fixed?
Get your priorities right and fix fundamental bugs in Xamarin!
Magnus Johansson +1
Magnus Johansson +2
a PR is up which should help address this issue .
All of the issues in this area were down to the google tooling not being able to handle spaces or escape parameters correctly. Much of the time spent investigating how to fix this was focused on working with or getting fixes for the existing tooling upstream.
However it has become clear that this is not going to happen. So we have reluctantly had to replace the google tools in this area in favour of coding our own solution. This is risky since it means if google changes the way multiplex works between our releases it could potentially break customers until we get a fix out. This has happened before with other tooling such as aapt and build tools.
That makes sense. If this is not a Xamarin-related issue, then I'd prefer to leave this out to avoid potentially worse issues in the future.
You can't just say let it be broken because that's safer. It doesn't work now, so what's safer about it staying broken.
Well, the only reason I came across this (pulling my hair out in the process) was that I installed a brand new VS/Xamarin on a PC.
Default Android SDK path seems to be "c:\Program Files(x86)"
With this knowledge in mind, why on earth is that the default location?
(I remember that pre-VS 2017, the default path was %USERPROFILE%\AppData\Local\Xamarin... )
> why on earth is that the default location?
See Bug 52336 and Bug 30362 from the "Blocks" list of this bug. In particular, note that the Android SDK installed by VS 2015 and VS 2017 is shared with tools other than Xamarin. My understanding is that the upstream Visual Studio team has been discussing changing that default location for future versions of VS 2017.
Interestingly the ndk is installed in
Fixed in Xamarin-android/master/6829b7d1
@dean when is this going to be released? Xamarin 4.5 and the current (at the time I'm writing this) Android 7.1 release still suffers of this same issue.
> when is this going to be released?
The "Target Milestone" of the bug is currently set to 15.3 based on the time at which the fix was committed to master. By default that means that the candidate fix will land as part of the Xamarin 15.3 Release. A preview version of 15.3 is currently available on Mac  and will tentatively be available in the near future on Windows.
- This Alpha release currently includes Xamarin.Android 126.96.36.199.
- Xamarin.Android 188.8.131.52 is based on xamarin-android commit 7716c28eecbe395da848db0e658061fbddd759ec, which is from about 1 day before the commit mentioned in Comment 32.
- By default the next Alpha preview of the Xamarin 15.3 Release would be very likely to pick up the commit from Comment 32.
Thanks Brendan, so this is likely to be part of the stable 15.3 release. Cheers!
*** Bug 56983 has been marked as a duplicate of this bug. ***
## Preliminary verification status: partially verified in development builds, waiting on follow-up Bug 57027
The candidate change from Comment 32 looks good so far to resolve the issue where the Android SDK path contains a space, but it leads to a slightly different issue (Bug 57027) if the _username_ contains a space.
*** Bug 56614 has been marked as a duplicate of this bug. ***
57027 is now verified as fixed
Created attachment 23064 [details]
[Verification] Example GOOD diagnostic build output
## Verification status: verified fixed for the 15.3 target release milestone
> GOOD: XamarinVS 184.108.40.2061 (a5ed8bf), Xamarin.Android 220.127.116.11 (5f3167a) (unpublished candidate for the _next_ "15.3 release" Beta version)
> GOOD: XamarinVS 18.104.22.168 (60c3d0e), Xamarin.Android 22.214.171.124 (5a73b38) (current "15.3 release" Beta version)
> BAD: XamarinVS 126.96.36.1996 (fec6f88), Xamarin.Android 188.8.131.52 (9dbc4c5) (current "15.2.3 release" Stable version)
(Testing note: The current Beta version Xamarin.Android 184.108.40.206 (5a73b38) produces additional warning messages due to an unrelated issue (tracked in non-public Bug 56882), but that issue is resolved in the new, not-yet-published candidate version Xamarin.Android 220.127.116.11 (5f3167a).)
## Steps followed to test
1. Ensure the Android SDK location set under "Tools > Options > Xamarin > Android Settings > Android SDK Location" in Visual Studio includes at least one space in the path. For example:
C:\Program Files (x86)\Android\android-sdk
2. Download and unzip attachment 22601 [details] (the test case from Bug 57027).
3. Attempt to build the "MinimalMultidexTest" project in the Release configuration in the Visual Studio IDE.
## GOOD Results
The build succeeds, and the Error List shows no errors.
### Excerpt from the diagnostic build output
> C:\Program Files\Java\jdk1.8.0_131\\bin\java.exe -Djava.ext.dirs="C:\Program Files (x86)\Android\android-sdk\build-tools\26.0.0\lib" com.android.multidex.MainDexListBuilder "C:\Users\Windows User\AppData\Local\Temp\qar5uthi.nqe.jar" "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v7.1\mono.android.jar;C:\Program Files (x86)\MSBuild\Xamarin\Android\android-support-multidex.jar;obj\Release\android\bin\classes" (TaskId:187)
> android/support/multidex/ZipUtil$CentralDirectory.class (TaskId:187)
> android/support/multidex/MultiDexApplication.class (TaskId:187)
> android/support/multidex/MultiDex$V19.class (TaskId:187)
> android/support/multidex/MultiDex$V4.class (TaskId:187)
> android/support/multidex/ZipUtil.class (TaskId:187)
> android/support/multidex/MultiDexExtractor$1.class (TaskId:187)
> android/support/multidex/MultiDexExtractor.class (TaskId:187)
> android/support/multidex/MultiDex$V14.class (TaskId:187)
> android/support/multidex/MultiDex.class (TaskId:187)
> Done executing task "CreateMultiDexMainDexClassList". (TaskId:187)
## BAD Results with the older Xamarin versions (Xamarin.Android 7.3)
The build fails, and the Error List shows the error discussed earlier in the bug report.
> Expecting class path separator ';' before '\Android\android-sdk\build-tools\26.0.0\lib\shrinkedAndroid.jar' in argument number 8
### Excerpts from the diagnostic build output
> C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.3\\mainDexClasses.bat --output obj\Release\multidex.keep "'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v7.1\mono.android.jar';'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\android-support-multidex.jar';'obj\Release\android\bin\classes'" (TaskId:226)
> CREATEMULTIDEXMAINDEXCLASSLIST : error : Expecting class path separator ';' before '\Android\android-sdk\build-tools\23.0.3\lib\shrinkedAndroid.jar' in argument number 8
> Done executing task "CreateMultiDexMainDexClassList" -- FAILED. (TaskId:226)
## Additional testing environment info (brief)
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Java JDK 8u131 (1.8.0_131) 64-bit
Android SDK Tools 25.2.5
Android SDK Platform-tools 26
Android SDK Build-tools 26
Android 7.1.1 (API 25) SDK Platform rev. 3
Windows 10 version 1607 (OS Build 14393.0)
US English locale, US Eastern time zone