I did all the work on the Gstreamer website, but it was very difficult. To help other people, I have documented this. Here is a tutorial for Linux (ubuntu) , but it can work with windows too, if you have any questions about this, just ask:) ... I will also link the project with gitlab, ready to work on Android Studio:
(tutorial 5) https://gitlab.com/eduardoprado/gstreamer-tutorial5.git
(tutorial 2) https://gitlab.com/eduardoprado/gstreamer-tutorial2.git
Using the library in Android Studio
The best way to understand and integrate GStreamer into a project is to make tutorials on this site: Sorry, you need to find the link yourself, I don't have a reputation to post a direct link
However, these tutorials are old and were created to work in Eclipse, to work with Android Studio you need:
1. Import tutorials using the Android Studios Import option;
2. Set Android Studio to use NDK.
3. Set the variable inside the Android.mk file. 4. Install Gradle to compile only some architecture.
5. Copy the Gstreamer class to the correct path.
6. Disconnect "Instante Run" from Android Studio. (edited 10/27/2017)
7. Correct the "linker gold" argument (edited 11/28/2017 for WINDOWS users only)
Each of these instructions will be explained in the following sections:
1. Import tutorials using the Android Studios import option
Android Studio has the ability to import a project from other IDEs. To import a Gstreamers project made in Eclipse, follow these steps:
1. Download all the tutorials from git :;
2. In Android Studio, go to File → New Import Project,
3. In the new browser window for the file, go to "gst-docs", select the desired project (in my case, tutorial 5) "android-tutorial-5" and click "OK".

2. Install Android Studio to use NDK
Now that the project has been imported, you need to tell Android Studio that the project uses the NDK framework. In this way, Gradle will be able to import and handle all the dependencies. To do this, we need to link the Android.mk file (already in the tutorial folder):
1. Right-click on the “application” in the left navigation tab
2. Click on "Project C ++ Link Using Gradle"
3. In a new window:
- Change "Build System" to "CMake" to "ndk-build"
- Click "..." and go to the location of Android.mks "/AndroidStudioProjects/android-studio-5/app/src/jni/Android.mk"
- Click OK
Now external assembly files will appear on the left tab of the projects. Some erros will also appear, this is normal and will be fixed in the following sections.
3. Set the variable inside the file "Android.mk"
The last section error occurs because "Android.mk" cannot find the path to where GStreamer was extracted. So let's move the GSTREAMER_ROOT_ANDROID variable to the path where GStreamer was extracted. To achieve this:
1. View the left tab and expand "External buildings",
2. Double-click on Android.mk to open the file.
3. On line 10, in the "Include $ (BUILD_SHARED_LIBRARY)" section, enter:
- "GSTREAMER_ROOT_ANDROID: = path "
- NO quotation marks
- path - the path (obviously) where the GStreamer was extracted.
After that, the Gradle will be synchronized and the error "*** Target arch ABI is not supported: mips. Stop" will be displayed.

4. Install Gradle to compile only some architecture
The error of the last section arises because the class is trying to build for different architectures, but it does not find the file for assembly in MIPS. To solve this problem, we will indicate architectures for building without MIPS:
1. In the left tab of the browser, expand Gradle Scripts,
2. Double-click "build.gradle (Module: app)"
3. In a line called "moduleName":
(to run tutorial 5)
- abiFilters 'x86', 'armeabi', 'armeabi-v7a', 'arm64-v8a'
(to run tutorial 2)
- abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'
(edit 11/21/2017: Recently I had problems with arm64-v8a ... devices with 64 bits did not display the live broadcast, I decided to "remove arm64-v8a" too)
(edit 3/29/2018: I realized that it might be necessary to remove more architecture depending on your version of Gstreamer and NDK, if it doesn’t work, try different combinations of removal)

5. Copy the Gstreamer class to the correct path.
The final configuration needed is to import the package in the Main class.

The error shown above occurs because the GStreamer class does not have a ".init" function. To solve this problem, we need to copy the GStreamer class from the file where it was extracted, and paste in the specified path:
- Browse, using the file manager from your system, to the file in which you extracted GStreamer.
- From the extracted file, navigate to the location of the GStreamer class. It is located at / arm / share / gst -android / ndk-build / GStreamer.java Copy GStreamer.java
- Go back to Android Studio and create an import path that tries to get the main class, starting with / app / java in the left tab of the browser. So, to the image above, we need to create the path org.freedesktop.gstreamer and insert the GStreamer.java file into it:
- Right click on java folder
- New-> Package
- Type org.freedesktop.gstreamer
- Right-click on org.freedesktop.gstreamer and Paste 5. The import error is currently resolved, but the new class has errors. To solve them all you have to do is remove the "@" from the copied class and all that is between the "@".
6. Disconnect "Instante Run" from Android Studio. (edited 10/27/2017)
This feature from Android Studio can cause problems when you try to start a project, so it’s a good idea to disable it.
Disabling "Instante Run":
1. In Android Studio, go to "File" → "Settings ..." (Ctrl + Alt + S)
2. "Assembly, execution, deployment" → "Instant start"
3. Uncheck the box "Enable immediate start in hot swap / change resources during deployment (enabled by default)"
4. Click Apply
7. Correct the "linker gold" argument (WINDOWS users only)
When you try Windows, you get an error message:
Error:error: invalid linker name in argument '-fuse-ld=gold'
To fix this:
1. Go to Android NDK Linker (GStreamer) - the linker name is incorrect -fuse-ld = gold
2. Follow the instructions of Antoine Zambelli .