function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

React Native project fails to start

Hi, I am trying to get the FirstReact project from Trailhead to work and I keep getting an error in Android Studio and the React-Native server when I click on the Run button in Android Studio.  Hoping that someone has run into this and can provide some insights.  I've been googling everywhere and tried a number of different things to resolve the error (delete the project and start over, gradelw clean, give all users full control over the folders, etc.) without any luck.  Any help would be greatly appreciated!!  Here's the kind of errors I am receiving:

In Android Studio:
Error:Could not read path 'C:\ReactNativeTests\FirstReact\mobile_sdk\salesforcemobilesdk-android\libs\SalesforceAnalytics\build\generated\source\r\debug\com\salesforce\androidsdk\analytics'.
> C:\ReactNativeTests\FirstReact\mobile_sdk\salesforcemobilesdk-android\libs\SalesforceAnalytics\build\generated\source\r\debug\com\salesforce\androidsdk\analytics

In the React Native server command window:
 ERROR  EPERM: operation not permitted, lstat 'C:\ReactNativeTests\FirstReact\mo
Error: EPERM: operation not permitted, lstat 'C:\ReactNativeTests\FirstReact\mob
    at Error (native)

Here's some information on my system:
Windows 7 Professional Version 6.1 (Build 7601: Service Pack 1)

java -version:
Java version 1.8.0_144
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

npm -version 5.5.1

node -v: 6.11.4

SalesForce Mobile SDK: 5.3.0

react-native -version
react-native-cli: 2.0.1
react-native: 0.43.1

Android Studio 3.0.1

Thanks for taking a look!
Richard Whitley 15Richard Whitley 15
Hopefully you've found the solution, but if not, please try installing and using forcereact rather than forcedroid. Forcereact is new for Mobile SDK 6.0 and creates the app using the new 6.0 libraries.

npm install -g  forcereact
Jaun MarkJaun Mark
If you could face any problems regarding so let's discuss with react native companies (