Hi all,
I'm currently working on a project where I have to enable multidex support because of the dalvik method reference constraints. This is mainly because I'm including very big libraries such as OpenCV and various google play service libraries.
However, I'm running in to problems when I'm building this with the multidex flag enabled. It seems that the toolchain on Xamarin Studio does not really like libraries which contains spaces in the file path. It fails on the following step as the jar from the openCV library contains spaces:
Target _CompileToDalvikWithDx: Created directory "obj/Release/proguard" Tool /Users/michaelgobbers/Library/Developer/Xamarin/android-sdk-macosx/build-tools/25.0.0//mainDexClasses execution started with arguments: --output obj/Release/multidex.keep '/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v5.0/mono.android.jar':'/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/android-support-multidex.jar':'obj/Release/__library_projects__/OpenCV/library_project_imports/bin/opencv library - 3.1.0.jar':'obj/Release/android/bin/classes' Error: Expecting class path separator ':' before 'library' in argument number 3 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Tool exited with code: 10. Output: Error: Expecting class path separator ':' before 'library' in argument number 3
If I do the exact same thing on visual studio it does seem to work...
This is easily reproducible if you clone the following repo and try to build the demo project with multidex support enabled.
https://github.com/TrekDev/Xamarin.Android.OpenCV
Anyone running in to the same issues and how would I overcome this issue?
I eventually fixed this by forking the openCV binding repo unzipping the library zip and renaming the .jar file.
I created a pull request on the repository but for some reason the owner closed it without merging.
You can find my fork at: https://github.com/michaelgobbers/Xamarin.Android.OpenCV
Answers
I'm experiencing the same error
I eventually fixed this by forking the openCV binding repo unzipping the library zip and renaming the .jar file.
I created a pull request on the repository but for some reason the owner closed it without merging.
You can find my fork at: https://github.com/michaelgobbers/Xamarin.Android.OpenCV