During the Android bundle building procedure, one of the error is very common in React-Native.
Error: Package Android.Support.Annotation Does Not Exist
This error says the project building process is missing an essential Google library called Android.Support.Annotation. This is usually caused by project code cleaning or just after cloning the project and fresh installing all libraries.
In order to solve this error, you will require the jetifier library to generate all essential libraries for the building process. This can be done easily with the following commands.
1. Install the jetifier binary
# Under the root path of React-Native project # Use either one of these: # 1) yarn command yarn add --save-dev jetifier # 2) npm command npm install --save-dev jetifier
2. Jetify the essential libraries
# Under the root path of React-Native project npx jetify
3. After that, you can try to rebuild the Android bundle.
cd Android ./gradlew bundleRelease