Hello, I am new to react-native development.
I have been trying to get a React-Viro project to successfully build onto my mobile S8 android device and have been struggling a lot. I am in a windows 10 environment using git-bash.
First Approach
I have been following the steps on the react-viro quickstart website.
1) react-native init ProjectAR --version0.57.7
2) cd ViroSample
3) npm install -S -E react-viro
4) copy the files from node_modules\react-viro\bin\files\javascript* to the root
5) In App.js assign API Key.
6) In index.android.js change to the name of my project
AppRegistry.registerComponent('ProjectAR', () => App);
When I run react-native run-android I get the error on my phone
Unable to resolve module 'react-native/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType from ...\ProjectAR\node_modules\react-viro\components\ViroImage.js
Module 'react-native/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType' does not exist in the current Haste module map
Second Approach
1) npm install -g react-viro-cli
2) react-viro init NewArProject
3) cd NewArProject
4) ./setup-ide.sh android
5) In App.js assign API Key.
When I run react-native run-android I get the error in my terminal
FAILURE: Build failed with an exception.
What went wrong:
Task 'installDebug' not found in project ':app'. Some candidates are: 'installArDebug', 'installGvrDebug', 'installOvrDebug'.
I go into my android directory and do
./gradlew app:installArDebug
But I get an error
Execution failed for task ':app:generateArDebugBuildConfig'.
Please help. Thanks
try -> react-native init ProjectAR --version0.59.3
We recently upgraded to RN 0.59.3 and this section of the documentation was not updated. It is now corrected
@dam00n Great thanks, I don't get that error anymore and the app boots up normally but when I click on the AR option in the app I get the error.
Invariant violation VRText was not found in the UIManager
When this happens this issue is often referenced here https://github.com/viromedia/viro/issues/177
I am not understanding the solution well. The person who wrote the solution is not clear what files need to be changed manually from android.setup.sh
I have done the following
./node_modules/react-viro/bin/android-setup.sh
Then I did
./gradlew.bat installGvrDebug
When I ran react-native run-android in the root I get the build failed error
Task 'installDebug' not found in project ':app'. Some candidates are: 'installArDebug', 'installGvrDebug', 'installOvrDebug'
Can you do step 2b found here -> https://docs.viromedia.com/docs/installing-viro-android#section-2b-windows-only-
I have been manually changing the files indicated the diff file.
It seems that a lot of the changes were already written in.
The only files that needed to be changed were
android/app/build.gradle
android/build.gradle
android/app/src/main/res/values/strings.xml
In android/build.gradle it's referencing a task wrapper function but that did not exist in that file.
If I have made these changes correctly, and runreact-native run-android it's theoretically supposed to work? I am still getting a build failed error.
Hello, I have the same problem:
Task 'installDebug' not found in project ':app'. Some candidates are: 'installArDebug', 'installGvrDebug', 'installOvrDebug'.
I tried two approaches: manually adding Viro an existing project and creating a test project by react-viro init. On ios everything is fine. But on android I`m getting a build failed error :(
I am in a OSX environment.
"react-native": "0.59.3",
"react-viro": "2.14.0"
Hi @kolesnikovakate, @jungley,
To solve your issue please add the --variant option to the react-native run-android command. If you try the following you should be able to run without error:
react-native run-android --variant=gvrDebug
Let me know if that doesn't work for you :)
@VikAdvani Thank you, that works!
But now I have another error https://github.com/viromedia/viro/issues/563 ;(
@kolesnikovakate @VikAdvani @dam00n I am new to viro-react. I installed viro-react as a dependency on the existing react-native project when i import it into a new component, not the app.js. get an error message whenever I navigate to the component. This is my package json

Hi @kolesnikovakate, @jungley,
To solve your issue please add the --variant option to the react-native run-android command. If you try the following you should be able to run without error:react-native run-android --variant=gvrDebugLet me know if that doesn't work for you :)
Hi @VikAdvani @jungley @kolesnikovakate
when i tried to run that command am facing this issue-----
**** What went wrong:
Could not determine the dependencies of task ':app:mergeGvrDebugAssets'.
Could not resolve all task dependencies for configuration ':app:gvrDebugRuntimeClasspath'.
Could not resolve project :mapbox_react-native-mapbox-gl.
Required by:
project :app
Unable to find a matching configuration of project :mapbox_react-native-mapbox-gl:
- None of the consumable configurations have attributes.
And i had manually linked react-native-mapbox-gl in settings.gradle. Thanks in advance.
The same error occurs after adding flavor in build gradle.
I tried changing the rn app version, but it doesn't work.
I refferd to this (https://gist.github.com/achuvm/fe0136818158bec2cdf4d1cd11053f6d)
Most helpful comment
Hi @kolesnikovakate, @jungley,
To solve your issue please add the --variant option to the react-native run-android command. If you try the following you should be able to run without error:
Let me know if that doesn't work for you :)