0

Here, I have built the react native android app using this documentation Doc in jenkins which was configured on ubuntu 16.04 (in virtual machine).

Here is the build command which I used to build the react native app(android) in Jenkins

cd $WORKSPACE && chmod -R 777 ./android && cd ./android && npm install && ./gradlew clean && ./gradlew assembleDebug

The build process end successfully creating an apk file in the following path build_release_v1/ws/android/app/build/outputs/apk/

Note build_release_v1 is the jenkins project name and ws is for the workspace of it.

Though the apk is created it comes up with following errors

enter image description here

What may be the case ....please help me with this ...Thanks in advance...

Kalanka
  • 1,019
  • 2
  • 18
  • 31

1 Answers1

0

The problem is that if you want a debug build (since you are using assembleDebug), React Native generates an APK that expects to have a connection to the bundle server (it does the same as react-native run-android). My guess is that you want to test the app without the bundler, so you have two options: either run assembleRelease instead (have a look here for more details) or manually create the bundled JavaScript code and then create the APK. Please refer to this question for details.

martinarroyo
  • 9,389
  • 3
  • 38
  • 75