react-native-unity-view icon indicating copy to clipboard operation
react-native-unity-view copied to clipboard

Cannot run the example code

Open chathuri4 opened this issue 4 years ago • 6 comments

Hi, I was trying to run the example code but got an error for Android

* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve project :UnityExport.
     Required by:
         project :app > project :@asmadsen_react-native-unity-view
      > Unable to find a matching configuration of project :UnityExport:
          - None of the consumable configurations have attributes.
   > Could not find :unity-classes:.
     Searched in the following locations:
       - file:/Users/chathuri/Downloads/react-native-unity-view-master/example/android/UnityExport/libs/unity-classes.jar
     Required by:
         project :app > project :@asmadsen_react-native-unity-view

Any thoughts? In the ReadMe I can see that it says to copy Unity Export which I cant really seem to find in the example folder either. I'm stuck at this step, as I am not sure how to generate the UnityExport folder

chathuri4 avatar Dec 21 '20 09:12 chathuri4

Anyone who is facing this issue? I can get iOS to build (only in device mode) but didnt have a chance to test it out as I dont have an iphone with me.

So I am really trying to run the android project and struggling, as I cant find the UnityExport folder in the /android folder. I am unclear if the whole Build.cs script is running as the apk is created under the UnityProject/Build folder but not the UnityExport folder itself.

I am using Unity 3D 2019.4

chathuri4 avatar Dec 23 '20 09:12 chathuri4

you can export from unity , In the Top Menu you can find "ReactNative" select android

Superming997 avatar Jan 30 '21 10:01 Superming997

bu I can't compile the Project also,

Superming997 avatar Jan 30 '21 10:01 Superming997

@Superming997 Can you kindly guide about the steps which you have performed after exporting the project. And how we can build and install using CLI.

syeddanishdev avatar Feb 15 '21 11:02 syeddanishdev

@chathuri4 you might have made the same mistake I did. I put all the root folders/files of my unity project inside /unity instead of my unity project folder.

I realized this when looking in the Build.cs at this line: static readonly string ProjectPath = Path.GetFullPath(Path.Combine(Application.dataPath, ".."));

I hope it can help.

Chefty avatar Mar 08 '21 11:03 Chefty

same issues

juanzjck avatar May 12 '21 22:05 juanzjck