Search code examples
androidreact-nativecocoapods

How to initialize react-native project only for Android?


Can I initialize react-native app just for android? I executed following on Mac

npx react-native init AwesomeProject

but fails with cocoapods related errors.

Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.

Now AFAIK, cocoapods is required for IOS app, and I don't want to spend time investigating those errors.


Solution

  • I had the same issues with cocoapods and this is how I was able to do it solely for android.

    npx react-native init testproject --skip-install
    
    npm install
    
    npx react-native run-android