Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundException and nothing exported #55

Open
CurralesDragon opened this issue Jul 20, 2021 · 7 comments
Open

FileNotFoundException and nothing exported #55

CurralesDragon opened this issue Jul 20, 2021 · 7 comments

Comments

@CurralesDragon
Copy link

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)

@srepollock
Copy link

@nicwhitts did you run the React Native export from within Unity?

@Arnaod
Copy link

Arnaod commented Dec 8, 2021

Hey,
I'm having the same issue, any update @nicwhitts ?

@CurralesDragon
Copy link
Author

Let me try and remember what happened here. Iv been using it again successfully.

@CurralesDragon
Copy link
Author

Post your Build.cs script and il take a look

@CurralesDragon
Copy link
Author

CurralesDragon commented Dec 8, 2021

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

@Arnaod
Copy link

Arnaod commented Dec 9, 2021

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.

@bll-manapulian
Copy link

Hi, @nicwhitts , or @Arnaod have you made it work already? I've tried Arnaod's changes but no luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants