azesmway / react-native-unity-play

Play an unity view in react native
MIT License
40 stars 16 forks source link

build failed pls help #7

Open w678 opened 2 years ago

w678 commented 2 years ago

at makeError (C:\Users\xylss\Downloads\Compressed\unityAndRN-master\unityAndRN-master\node_modules\execa\index.js:174:9) at C:\Users\xylss\Downloads\Compressed\unityAndRN-master\unityAndRN-master\node_modules\execa\index.js:278:16 at processTicksAndRejections (internal/process/task_queues.js:95:5) at async runOnAllDevices (C:\Users\xylss\Downloads\Compressed\unityAndRN-master\unityAndRN-master\node_modules\@react-native-community\cli-platform-android\build\commands\runAn droid\runOnAllDevices.js:94:5) at async Command.handleAction (C:\Users\xylss\Downloads\Compressed\unityAndRN-master\unityAndRN-master\node_modules\react-native\node_modules\@react-native-community\cli\build\ index.js:186:9) info Run CLI with --verbose flag for more details. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! unityAndRN@0.0.1 android: react-native run-android npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the unityAndRN@0.0.1 android script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\xylss\AppData\Roaming\npm-cache_logs\2021-10-11T15_35_18_293Z-debug.log

azesmway commented 2 years ago

at makeError (C:\Users\xylss\Downloads\Compressed\unityAndRN-master\unityAndRN-master\node_modules\execa\index.js:174:9) at C:\Users\xylss\Downloads\Compressed\unityAndRN-master\unityAndRN-master\node_modules\execa\index.js:278:16 at processTicksAndRejections (internal/process/task_queues.js:95:5) at async runOnAllDevices (C:\Users\xylss\Downloads\Compressed\unityAndRN-master\unityAndRN-master\node_modules@react-native-community\cli-platform-android\build\commands\runAn droid\runOnAllDevices.js:94:5) at async Command.handleAction (C:\Users\xylss\Downloads\Compressed\unityAndRN-master\unityAndRN-master\node_modules\react-native\node_modules@react-native-community\cli\build index.js:186:9) info Run CLI with --verbose flag for more details. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! unityAndRN@0.0.1 android: react-native run-android npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the unityAndRN@0.0.1 android script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\xylss\AppData\Roaming\npm-cache_logs\2021-10-11T15_35_18_293Z-debug.log

Hi! Tell us more pls

w678 commented 2 years ago

silly question, first, I git clone the repo then what's next? I try to run npm install react-native-unity-play --save but got error, npm ERR! code ENOSELF npm ERR! Refusing to install package with name "react-native-unity-play" under a package npm ERR! also called "react-native-unity-play". Did you name your project the same npm ERR! as the dependency you're installing? npm ERR! npm ERR! For more information, see: npm ERR! https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\xylss\AppData\Roaming\npm-cache_logs\2021-10-11T16_22_23_573Z-debug.log

azesmway commented 2 years ago
npx react-native init mytest
cd mytest
yarn add react-native-unity-play
cd ios && pod install

and further on description

w678 commented 2 years ago

What do you meant by move your Unity project to unity folder at project root?

azesmway commented 2 years ago

What do you meant by move your Unity project to unity folder at project root?

it was so comfortable for me. you can put where you like

w678 commented 2 years ago

after i followed all the steps and try to run npm run android, i got the same error,

at makeError (C:\Users\FORGE-15 PRO\Desktop\react\FirstApp\node_modules\execa\index.js:174:9) at C:\Users\FORGE-15 PRO\Desktop\react\FirstApp\node_modules\execa\index.js:278:16 at processTicksAndRejections (internal/process/task_queues.js:95:5) at async runOnAllDevices (C:\Users\FORGE-15 PRO\Desktop\react\FirstApp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:106:5) at async Command.handleAction (C:\Users\FORGE-15 PRO\Desktop\react\FirstApp\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:192:9) info Run CLI with --verbose flag for more details. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! FirstApp@0.0.1 android: react-native run-android npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the FirstApp@0.0.1 android script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\FORGE-15 PRO\AppData\Roaming\npm-cache_logs\2021-10-11T17_06_17_343Z-debug.log

azesmway commented 2 years ago

https://github.com/azesmway/react-native-unity-play/issues/2#issuecomment-867084273

w678 commented 2 years ago

same error, can you provide a simple project? thanks

azesmway commented 2 years ago

same error, can you provide a simple project? thanks

if you provide a unity project to create an example - I can make an example like this

w678 commented 2 years ago

https://drive.google.com/file/d/1dU8IYr6VbUgxKaVcbu1KOYMWTL56bVAK/view?usp=sharing

thanks

azesmway commented 2 years ago

https://drive.google.com/file/d/1dU8IYr6VbUgxKaVcbu1KOYMWTL56bVAK/view?usp=sharing

thanks

ok

azesmway commented 2 years ago

https://drive.google.com/file/d/1dU8IYr6VbUgxKaVcbu1KOYMWTL56bVAK/view?usp=sharing

thanks

Add Example https://drive.google.com/file/d/1D3oaHstzlmIAvIqzbwfSTwlonxJev7Yh/view?usp=sharing

I used MacOS and iMac for build project And Android Studio & Xcode

w678 commented 2 years ago

yeah finally able to build and run but got another issue, once i run the unity game

your hardware does not support this application failed to load libmain.so

azesmway commented 2 years ago

yeah finally able to build and run but got another issue, once i run the unity game

your hardware does not support this application failed to load libmain.so

Screenshot at Oct 12 13-31-18
w678 commented 2 years ago

after i changed the setting, another error

azesmway commented 2 years ago

Need installed NDK

w678 commented 2 years ago

i have already put the path but still got this error

azesmway commented 2 years ago

i have already put the path but still got this error

versions which are the same in the configs and installed?

azesmway commented 2 years ago

I made an example that works for me on android and aios. compare with him

w678 commented 2 years ago

can i know which ndk version u are using?

azesmway commented 2 years ago

can i know which ndk version u are using?

ndkVersion = "22.1.7171670"

w678 commented 2 years ago

finally able to run it, thanks a lot, but looks that it is not able to run in emulator? still got this error,

your hardware does not support this application failed to load libmain.so

azesmway commented 2 years ago

finally able to run it, thanks a lot, but looks that it is not able to run in emulator? still got this error,

your hardware does not support this application failed to load libmain.so

only works on a real device

w678 commented 2 years ago

hi do you know how to make the unity game in landscape mode?

azesmway commented 2 years ago

hi do you know how to make the unity game in landscape mode?

I think that you can try to export in this mode and see how it will work

w678 commented 2 years ago

i have tried it but it cant unfortunately

azesmway commented 2 years ago

hi do you know how to make the unity game in landscape mode?

I think that you can try to export in this mode and see how it will work

need to try I didn't have such a task

w678 commented 2 years ago

i figured it out already thanks a lot

w678 commented 2 years ago

one more question, is it possible to close the unity view completely after click the close button?

azesmway commented 2 years ago

I think yes, you need to read the documentation on how to completely unload a unity on closing