-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.j2
112 lines (85 loc) · 2.8 KB
/
README.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{% set perPackageManager = {
"npm": {
"start": "npm start",
"android": "npm run android",
"ios": "npm run ios",
"test": "npm test",
"lint": "npm run lint"
},
"yarn": {
"start": "yarn start",
"android": "yarn android",
"ios": "yarn ios",
"test": "yarn test",
"lint": "yarn lint"
}
}[packageManager]%}
# React Native Project
This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using the React Native CLI.
## Getting Started
### Running the App
The development environment is already set up with all necessary dependencies. You can start developing right away!
#### Android
To run your app on Android:
```bash
{{perPackageManager.android}}
```
This will:
1. Start the Metro bundler if it's not already running
2. Build the Android app
3. Install and launch it on the Android emulator
#### iOS
To run your app on iOS (requires macOS):
```bash
{{perPackageManager.ios}}
```
### Development
The Metro bundler will start automatically when you run the app. If you need to start it manually:
```bash
{{perPackageManager.start}}
```
### Testing and Linting
Run tests:
```bash
{{perPackageManager.test}}
```
Run linter:
```bash
{{perPackageManager.lint}}
```
## Project Structure
```
your-project/
├── android/ # Android native code
├── ios/ # iOS native code
├── src/ # JavaScript/TypeScript source code
│ ├── components/ # Reusable components
│ ├── screens/ # Screen components
│ └── App.tsx # Application entry point
├── __tests__/ # Test files
├── .idx/ # IDX configuration
└── package.json # Project dependencies and scripts
```
## Useful Resources
- [React Native Documentation](https://reactnative.dev/docs/getting-started)
- [React Native CLI](https://github.com/react-native-community/cli)
- [Metro Bundler](https://facebook.github.io/metro/)
- [React Native Testing](https://reactnative.dev/docs/testing-overview)
## Troubleshooting
### Metro Bundler Issues
If you encounter issues with Metro bundler:
1. Clear Metro cache: `{{packageManager}} start --reset-cache`
2. Make sure Watchman is running properly
3. Check the terminal output for specific error messages
### Android Build Issues
If you encounter Android build issues:
1. Check that ANDROID_HOME is properly set
2. Ensure Android SDK tools are properly installed
3. Try cleaning the build: `cd android && ./gradlew clean`
### iOS Build Issues
If you encounter iOS build issues:
1. Make sure you have Xcode installed (macOS only)
2. Try cleaning the build: `cd ios && pod install`
3. Clear derived data in Xcode
## License
This project is open source and available under the MIT License.