If you see the error "Activity class {com.codeandrobots/com.codeandrobots.MainActivity} does not exist" then all is OK but you have to find and launch the Code & Robots app manually from your device. This error occurs because react-native CLI doesn't work well yet with Android variants.
If you see the error "Device is UNAUTHORIZED", make sure to click OK when the popup "Allow USB debugging" shows on your device.
To check to see if your device is connected and authorized:
adb devices
If you see the error "Failed to create directory" then keep running react-native run-android --variant=devDebug
until they stop happening, sometimes as much as 3 or 4 times 😖
If you see the error "Operation not permitted, lstat" then try the following:
- Start the React Native bundler inside a NEW terminal or command prompt
cd codeandrobots-app
npm cache clean
npm start -- --reset-cache
- Run the app in a different terminal or command prompt, see Step 7 above
If you see the error "Could not dispatch a message to the daemon" then run adb devices
and make sure that the daemon is running or starts successfully and also that your attached device is listed.
Detox is causing post-install issues and has been removed from the project.
If you are running an older version and must remove Detox manually:
- In package.json, remove all mentions of
detox
:
- Remove
test-e2e
script - Remove detox as a devDependency.
- Remove detox configuration listing
- Rerun installation step 4:
yarn install --ignore-engines
React Native is unable to locate the requested simulator to run the app.
- Navigate to node-modules/react-native/local-cli/runIOS/findMatchingSimulator.js
- Change
if (version.indexOf('iOS') !== 0)
toif (!version.includes('iOS'))
glog logging module didn't install correctly.
Copy the glog-0.3.4 directory into ...node_modules/react-native/third-party
If you see the error "unable to resolve module ./index" then try the following:
- Reinstall dependencies
cd codeandrobots-app
- Mac or Linux
rm -rf node-modules
- Windows
- Delete the
codeandrobots-app\node-modules
folder manually in File Explorer
- Delete the
yarn install --ignore-engines
- Start the React Native bundler inside a NEW terminal or command prompt
cd codeandrobots-app
npm cache clean
npm start -- --reset-cache
- Run the app in a different terminal or command prompt
react-native run-android --variant=devDebug
If you see the error "Failed to create directory" then keep running react-native run-android --variant=devDebug
until they stop happening, sometimes as much as 3 or 4 times :/
If you see the error "Activity class {com.codeandrobots/com.codeandrobots.MainActivity} does not exist" then all is OK but you have to launch the Code & Robots app manually from your device. This error occurs because react-native CLI doesn't work well yet with Android variants.
If you see the error "Operation not permitted, lstat" then try the following:
- Start the React Native bundler inside a NEW terminal or command prompt
cd codeandrobots-app
npm cache clean
npm start -- --reset-cache
- Run the app in a different terminal or command prompt
react-native run-android --variant=devDebug
If you see the error "Could not dispatch a message to the daemon" then run adb devices
and make sure that the daemon is running or starts successfully and also that your attached device is listed.