f111fei / react-native-unity-demo

103 stars 80 forks source link

Unable to successfully execute: npm run ios and android #36

Closed saudahmed closed 5 years ago

saudahmed commented 5 years ago

I am try to setup this demo project:

My development environment is as follows:

Unity: 2018.3.11f1 Xcode: 10.2 Android Studio: 3.0

I have project under unity/Cube/Assets/test.unity inside Unity. And the next step was to try doing Build > Export Android / Export iOS.

Export Android build fine, but when I do npm run android after "npm install" it says

* Where:
Build file '/Users/saudahmed/Downloads/react-native-unity-demo-master/android/UnityExport/build.gradle' line: 78

* What went wrong:
A problem occurred evaluating project ':UnityExport'.
> Could not find method bundle() for arguments [build_cxleajmcepp8gnsdjtwlgsv2v$_run_closure3$_closure12@4ef76084] on object of type com.android.build.gradle.LibraryExtension.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

When i do npm run ios it gives

> rnunitydemo@0.0.1 ios /Users/saudahmed/Downloads/react-native-unity-demo-master
> node node_modules/react-native/local-cli/cli.js run-ios

Found Xcode project rnunitydemo.xcodeproj

Could not find iPhone 6 simulator

Error: Could not find iPhone 6 simulator

I am not able todo anything after it. the readme is incomplete to state.

saudahmed commented 5 years ago

I am using master branch as unity version is 2018.3.11f1

cnagy commented 5 years ago

You are not able to run it on the XCode simulator.