user3312266
user3312266

Reputation: 189

Getting React-Viro Build working on android

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

Upvotes: 1

Views: 1053

Answers (1)

DeQyd
DeQyd

Reputation: 11

Use react-native run-android --variant=gvrDebug instead.

Upvotes: 1

Related Questions