Error On Importing ARDK 2.1

Description of the issue:

  • Issue category: Developer Tools
  • Device type & OS version: Android (Using for Google Pixel 2 XL)
  • Host machine & OS version: Windows 10 & Andriod version 11.0
  • Issue Environment : Unity Remote
  • Xcode version: (for andriod)
  • ARDK version: 2.1.0
  • Unity version: 2020.3.2.1f1

I’ve got these errors upon installing ARDK 2.1 Package

DirectoryNotFoundException: Could not find a part of the path “C:\Users\winst\Downloads\XR202 - Augmented Reality\LightShip_Demo\Assets\ARDK\Plugins\unity_exports\ardk_client_platform\libs\protobuf_csharp_dll\Niantic.Protobufs\System.Runtime.CompilerServices.Unsafe.4.5.2\netstandard2.0\Niantic.System.Runtime.CompilerServices.Unsafe.dll”
System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) (at <695d1cc93cca45069c528c15c9fdd749>:0)
(wrapper remoting-invoke-with-check) System.IO.FileStream…ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
Mono.Cecil.ModuleDefinition.GetFileStream (System.String fileName, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) (at :0)
Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) (at :0)
Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) (at :0)
UnityEditor.AssemblyHelper.ExtractAllClassesThatAreUserExtendedScripts (System.String path, System.String& classNamesArray, System.String& classNameSpacesArray, System.String& originalClassNameSpacesArray) (at <208f92fc783546f9abbe643bfc23920c>:0)

Hello Winston,

The Windows operating system imposes a maximum filename length such that a filename, including the file path to get to the file, can’t exceed 256 characters. Can you please check if you don’t exceed the path length limit? If yes, then that might be the reason why you are getting this error.
Hope it helps!

Please let me know if this helps.

I’ve had this problem in editors, 2021.3.2 and 2021.3.9. It was my project name that was causing this error. It was quite long and had hyphens. Shortening the name and removing the hyphens seemed to work in both editors, but I think hyphens are usually acceptable.