f111fei / react-native-unity-demo

103 stars 80 forks source link

Android export error #47

Closed slimmziy closed 4 years ago

slimmziy commented 4 years ago

Hi, thanks for the plugin first of all, but i'm having a problem here while trying to export my unity project to android, even tho, i followed the tutorial as it is, fresh project nothing yet added but cube.

says:

DirectoryNotFoundException: Could not find a part of the path 'S:\Codes\Projects\Flutter\vreals\unity\Test AR Polos\Builds\vreals.apk\vreals'. System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) (at <437ba245d8404784b9fbab9b439ac908>:0) System.IO.FileSystemEnumerableIterator1[TSource].HandleError (System.Int32 hr, System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0) System.IO.FileSystemEnumerableIterator1[TSource].CommonInit () (at <437ba245d8404784b9fbab9b439ac908>:0) System.IO.FileSystemEnumerableIterator1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler1[TSource] resultHandler, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0) System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0) System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0) System.IO.Directory.InternalGetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) (at <437ba245d8404784b9fbab9b439ac908>:0) System.IO.Directory.GetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) (at <437ba245d8404784b9fbab9b439ac908>:0) Build.Copy (System.String source, System.String destinationPath) (at Assets/Editor/Build.cs:91) Build.DoBuildAndroid () (at Assets/Editor/Build.cs:42)

I also tried to manage to solve the problem by creating the folder required manually. But after that, i face another error regarding build.gradle

I hope this error get solution, in advance. Thanks

slimmziy commented 4 years ago

Problem solved, i was using the wrong Build.cs version with my 2019.3.15 unity here's the correct version of it (https://github.com/snowballdigital/flutter-unity-view-widget/tree/master/scripts)