react-native-unity-view
react-native-unity-view copied to clipboard
FileNotFoundException and nothing exported
Hello!
I'v been using this package for some time, but recently upgraded unity to version 2020 as it was the only way to fix a Unity bug.
But now when exporting android, I receive the error message:
FileNotFoundException: Could not find file "/Users/bla/src/c/packages/c-native/android/UnityExport/build.gradle"
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, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) (at <695d1cc93cca45069c528c15c9fdd749>:0)
(wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize, System.Boolean checkHost) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.StreamReader..ctor (System.String path) (at <695d1cc93cca45069c528c15c9fdd749>:0)
(wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string)
System.IO.File.ReadAllText (System.String path) (at <695d1cc93cca45069c528c15c9fdd749>:0)
Build.DoBuildAndroid (System.String buildPath) (at Assets/Scripts/Editor/Build.cs:64)
Build.DoBuildAndroidLibrary () (at Assets/Scripts/Editor/Build.cs:25)
Is this error causing the export to fail or is the error appearing because nothing is exported (there's noting in the UnityExport folder)
@nicwhitts did you run the React Native export from within Unity?
Hey, I'm having the same issue, any update @nicwhitts ?
Let me try and remember what happened here. Iv been using it again successfully.
Post your Build.cs script and il take a look
Actually, it could of been this fix in build.gradle:
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
Changing to unityLibrary instead of unityExport
There may be some other places I had to change this if i remember correctly. But maybe not! Let me know
Hi, thank you for your answers.
So far I changed it in the build.gradle :
include ":unityLibrary" project(":unityLibrary").projectDir = file("./UnityExport")
As well as settings.gradle:
flatDir { dirs "${project(':unityLibrary').projectDir}/libs" }
But still, I need to check "Export Project" for my build to work.
Hi, @nicwhitts , or @Arnaod have you made it work already? I've tried Arnaod's changes but no luck