# Android Examples updated for Android Studio

**URL:** https://discourse.gstreamer.org/t/android-examples-updated-for-android-studio/1159
**Category:** General Discussion
**Created:** [March 12, 2024, 5:14am UTC](https://discourse.gstreamer.org/t/android-examples-updated-for-android-studio/1159 "2024-03-12T05:14:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![almita](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/a/8edcca/32.png) [@almita](https://discourse.gstreamer.org/u/almita)
#### Post date: [March 12, 2024, 5:14am UTC](https://discourse.gstreamer.org/t/android-examples-updated-for-android-studio/1159/1 "2024-03-12T05:14:41Z")

</div>

Hello!  
I hope you´re doing great.  
I´m very very new in Gstreamer and I need to play a RTSP with h265 for Android mobile.  
I donwload the examples to have a reference that can work and I found a couple of issues.

1. The examples 2,3,4,5 without any modification, generates an ANR while playing on Android. To fix that in the Android.mk I had to manually add the plugins like:

GSTREAMER\_PLUGINS := coreelements

Any suggestion to fix that???

1. On the other hand, I was not able to play any video either locally or just a basic one like:  
[https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4](https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4)

Also, when I try the rstp video I got: rtspsrc2: Could not open resource for reading and writing. This is after trying to change the tutorial 5.c with the gstreamer comand that i need: “rtspsrc location=rtsp://192.0.0.0”

Any help or suggestion???  
Thanks in advance.

---

<div class="post-metadata">

### Author: ![haiha95](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/h/8baadc/32.png) [@haiha95](https://discourse.gstreamer.org/u/haiha95)
#### Post date: [July 14, 2024, 4:47pm UTC](https://discourse.gstreamer.org/t/android-examples-updated-for-android-studio/1159/2 "2024-07-14T16:47:48Z")

</div>

It’s a little late, but if you (or anyone) still struggle:

1. In [GStreamer official tutorial for Android development](https://gstreamer.freedesktop.org/documentation/installing/for-android-development.html?gi-language=c), you can add these lines in `Android.mk` file:

2. I am not 100% sure the problem of playing the video, but maybe you want to check if permission to use the Internet is already in the `AndroidManifest.xml` file.

3. `rtspsrc2: Could not open resource for reading and writing`. The error shows there is no source to open. The way the tutorial of #3, 4 and 5 set up is to initialize the pipeline immediately at `onCreate()` function. You need to make sure the video at your location must be available first, even before you open the application, OR delay the gstreamer `init()` by adding user-interface interactions.

---

<div class="post-metadata">

### Author: ![surya](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/s/8e8cbc/32.png) [@surya](https://discourse.gstreamer.org/u/surya)
#### Post date: [December 1, 2025, 7:22am UTC](https://discourse.gstreamer.org/t/android-examples-updated-for-android-studio/1159/3 "2025-12-01T07:22:22Z")

</div>

Hey  
I´m also very very new in Gstreamer and I need to play a RTSP with h265 for Android

I am trying to build tutorials but unfortunately not able to build  
also tried to create new project by myself but getting no .so files then no rtspsrc element

can you please help me out I am stuck into this loop since couple of weeks!!!
