Hi, I try to test Babylon React Native Sample on an android virtual device;
As a novice using React Native, I first do what the React native documentation said and smoothly run on the emulator.
Then I followed the instruction of the Babylon React Native Sample, but I failed without understanding what I missed;
Then tried to do it from scratch, but both the sample and the from-scratch ended with the same error:
Hiwo@Mmmmmporg MINGW64 /f/Code/Game_code/BabylonJs/BabylonReactNativeSample
$ npm run android
> BabylonReactNativeSample@0.0.1 android
> react-native run-android
Get-ChildItem : Cannot find path 'F:\Common7\IDE\Extensions\' because it does not exist.
At
F:\Code\Game_code\BabylonJs\BabylonReactNativeSample\node_modules\react-native-windows\Scripts\rnw-dependencies.ps1:174
char:19
+ ... $natvis = Get-ChildItem "$vsPath\Common7\IDE\Extensions\cppwinrt.na ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (F:\Common7\IDE\Extensions\:String) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 888 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
Starting a Gradle Daemon (subsequent builds will be faster)
WARNING:: Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.
This repository is deprecated and it will be shut down in the future.
See http://developer.android.com/r/tools/jcenter-end-of-service for more information.
Currently detected usages in: project ':babylonjs_react-native-iosandroid-0-65'
> Task :app:mergeDebugAssets FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
11 actionable tasks: 11 executed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :app
project :app > project :babylonjs_react-native-iosandroid-0-65
project :app > project :react-native-permissions
> Could not resolve com.facebook.react:react-native:0.65.2.
> java.lang.NullPointerException (no error message)
* 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 47s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :app
project :app > project :babylonjs_react-native-iosandroid-0-65
project :app > project :react-native-permissions
> Could not resolve com.facebook.react:react-native:0.65.2.
> java.lang.NullPointerException (no error message)
* 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 47s
at makeError (F:\Code\Game_code\BabylonJs\BabylonReactNativeSample\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at F:\Code\Game_code\BabylonJs\BabylonReactNativeSample\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runOnAllDevices (F:\Code\Game_code\BabylonJs\BabylonReactNativeSample\node_modules\@react-native-community\cli-platform-android\src\commands\runAndroid\runOnAllDevices.ts:90:5)
at Command.handleAction (F:\Code\Game_code\BabylonJs\BabylonReactNativeSample\node_modules\@react-native-community\cli\src\index.ts:145:11)
info Run CLI with --verbose flag for more details.