# Building react native webrtc aar

**URL:** <https://react-native-webrtc.discourse.group/t/building-react-native-webrtc-aar/1691>\
**Category:** Android\
**Created:** [January 9, 2023, 5:53pm UTC](https://react-native-webrtc.discourse.group/t/building-react-native-webrtc-aar/1691 "2023-01-09T17:53:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaulr](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/shaulr/32/684_2.png) [@shaulr](https://react-native-webrtc.discourse.group/u/shaulr)\
**Post date:** [January 9, 2023, 5:53pm UTC](https://react-native-webrtc.discourse.group/t/building-react-native-webrtc-aar/1691/1 "2023-01-09T17:53:24Z")

</div>

Hi,  
I have a project I am working on, it uses jitsi SDK, which is using react-native-webrtc, via Jitsi SDK. I need to make a small change to webrtc code, but to do that, I need to compile my own react-native-webrtc and jitsi SDK using my version of libjingle and libwertc.

What is “by the book” way to build react-native-webrtc.aar? I do not want to change the react-native code, only the underlaying webrtc.  
Tx.

---

<div class="post-metadata">

**Author:** ![davidliu](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/davidliu/32/646_2.png) [@davidliu](https://react-native-webrtc.discourse.group/u/davidliu)\
**Post date:** [January 10, 2023, 1:13pm UTC](https://react-native-webrtc.discourse.group/t/building-react-native-webrtc-aar/1691/2 "2023-01-10T13:13:36Z")

</div>

Their build script can be found here:

> <https://github.com/react-native-webrtc/react-native-webrtc/blob/master/tools/build-webrtc.py>

---

<div class="post-metadata">

**Author:** ![shaulr](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/shaulr/32/684_2.png) [@shaulr](https://react-native-webrtc.discourse.group/u/shaulr)\
**Post date:** [January 11, 2023, 9:05am UTC](https://react-native-webrtc.discourse.group/t/building-react-native-webrtc-aar/1691/3 "2023-01-11T09:05:43Z")

</div>

Yes, it is 1st part, it builds webrtc.jar and libjingle\_peerconnection\_so.so, but not full aar, there is a build.gradle in android directory set up to build an aar, but not in the root and there is no gradlew. I made my own, but not sure if I did it correctly. Or perhaps there is a different build method that I am supposed to use.

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [January 12, 2023, 3:52pm UTC](https://react-native-webrtc.discourse.group/t/building-react-native-webrtc-aar/1691/4 "2023-01-12T15:52:56Z")

</div>

The best way would be for you to build the SDK since it builds the dependencies too. There is a script in the android/scripts directory that does that.

---

<div class="post-metadata">

**Author:** ![shaulr](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/shaulr/32/684_2.png) [@shaulr](https://react-native-webrtc.discourse.group/u/shaulr)\
**Post date:** [January 15, 2023, 9:16am UTC](https://react-native-webrtc.discourse.group/t/building-react-native-webrtc-aar/1691/5 "2023-01-15T09:16:42Z")

</div>

tx.  
release-sdk.sh in jitsi SDK repo? It did compile webrtc and react-native-webrtc. But it has different number at the end of the name…  
It actuallly created 3 of them:  
./com/facebook/react/react-native-webrtc/1.100.0-jitsi-12577422/react-native-webrtc-1.100.0-jitsi-12577422.aar  
./com/facebook/react/react-native-webrtc/1.100.0-jitsi-12577808/react-native-webrtc-1.100.0-jitsi-12577808.aar  
./com/facebook/react/react-native-webrtc/1.100.0-jitsi-12576860/react-native-webrtc-1.100.0-jitsi-12576860.aar  
Original file, that I got from jitsi maven for same SDK, 5.1.0, is:  
react-native-webrtc-1.100.0-jitsi-10639879.aar

What is the difference between those numbers?

---

<div class="post-metadata">

**Author:** ![Tunshutegong](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/tunshutegong/32/822_2.png) [@Tunshutegong](https://react-native-webrtc.discourse.group/u/Tunshutegong)\
**Post date:** [June 28, 2024, 7:08am UTC](https://react-native-webrtc.discourse.group/t/building-react-native-webrtc-aar/1691/6 "2024-06-28T07:08:32Z")

</div>

Hello, I am encountering the same problem，How do you rebuild React-Native-Webrtc? Thank you!
