unable to run gstreamer1.0 android apps on mac os x w/ android studio
Sérgio Agostinho
sergio.r.agostinho at gmail.com
Wed Sep 16 16:07:33 PDT 2015
I'm more inclined to assume that it's some configuration issue with Android
Studio, given that it's failing on :androidtutorial1:compileDebugNdk,reporting
it doesn't find the header file.
Remember that you already already compiled your native code successfully
before, using ndk-build from the command line.
Cheers
2015-09-16 20:13 GMT+02:00 Daniel Marfil <danimarfil0 at gmail.com>:
> You are right, now it is copied on the correct folders and it is shown on
> the IDE.
> The problem I get now is that gst/gst.h is not found when building the
> project:
>
> Executing tasks: [clean, :androidtutorial1:compileDebugSources,
> :androidtutorial1:compileDebugAndroidTestSources]
>
> Configuration on demand is an incubating feature.
> :androidtutorial1:clean
> :androidtutorial1:preBuild UP-TO-DATE
> :androidtutorial1:preDebugBuild UP-TO-DATE
> :androidtutorial1:checkDebugManifest
> :androidtutorial1:prepareDebugDependencies
> :androidtutorial1:compileDebugAidl
> :androidtutorial1:compileDebugRenderscript
> :androidtutorial1:generateDebugBuildConfig
> :androidtutorial1:generateDebugAssets UP-TO-DATE
> :androidtutorial1:mergeDebugAssets
> :androidtutorial1:generateDebugResValues UP-TO-DATE
> :androidtutorial1:generateDebugResources
> :androidtutorial1:mergeDebugResources
> :androidtutorial1:processDebugManifest
> :androidtutorial1:processDebugResources
> :androidtutorial1:generateDebugSources
> :androidtutorial1:processDebugJavaRes UP-TO-DATE
> :androidtutorial1:compileDebugJavaWithJavac
> :androidtutorial1:compileDebugNdk
> AGPBI: {"kind":"error","text":"gst/gst.h: No such file or
> directory","sources":[{"file":"/Users/dani/AndroidstudioProjects/GStreamer/android-tutorial-1/androidtutorial1/src/main/jni/tutorial-1.c","position":{"startLine":3,"startColumn":20}}]}
> AGPBI: {"kind":"simple","text":"compilation terminated.","sources":[{}]}
> AGPBI: {"kind":"simple","text":"make: ***
> [/Users/dani/AndroidstudioProjects/GStreamer/android-tutorial-1/androidtutorial1/build/intermediates/ndk/debug/obj/local/arm64-v8a/objs/tutorial-1//Users/dani/AndroidstudioProjects/GStreamer/android-tutorial-1/androidtutorial1/src/main/jni/tutorial-1.o]
> Error 1","sources":[{}]}
>
>
> FAILED
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':androidtutorial1:compileDebugNdk'.
> > com.android.ide.common.process.ProcessException:
> org.gradle.process.internal.ExecException: Process 'command
> '/Users/dani/Library/Android/sdk/ndk-bundle/ndk-build'' finished with
> non-zero exit value 2
>
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or
> --debug option to get more log output.
>
> BUILD FAILED
>
> Total time: 24.477 secs
>
> So I suppose that my GStreamer-1.0 installation is not correct.
> In order to have it my next step is installing the gstreamer source code
> via cerbero following this link:
>
> http://luisbg.blogalia.com/historias/74916
>
> But changing 1.4.3 for 1.4.4 on the code. At this moment I am stuck on the
> instruction:
>
> $./cerbero-uninstalled bootstrap
>
> Where I get the next return:
>
> [(16/18) intltool -> configure ]
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... no
> checking for mawk... no
> checking for nawk... no
> checking for awk... awk
> checking whether make sets $(MAKE)... yes
> checking for perl... /opt/local/bin/perl
> checking for perl >= 5.8.1... 5.16.3
> checking for XML::Parser... configure: error: XML::Parser perl module is
> required for intltool
> Running command './configure --prefix /Users/dani/cerbero/build-tools
> --libdir /Users/dani/cerbero/build-tools/lib --disable-maintainer-mode
> --disable-silent-rules --enable-introspection
> --build=x86_64-apple-darwinx'
>
> Recipe 'intltool' failed at the build step 'configure'
> Select an action to proceed:
> [0] Enter the shell
> [1] Rebuild the recipe from scratch
> [2] Rebuild starting from the failed step
> [3] Skip recipe
> [4] Abort
>
> By selecting option [0] and copy/pasting:
>
> ./configure --prefix /Users/dani/cerbero/build-tools --libdir
> /Users/dani/cerbero/build-tools/lib --disable-maintainer-mode
> --disable-silent-rules --enable-introspection
> --build=x86_64-apple-darwinx
>
> I get the same error (obvious).
>
> So I have checked if I have XML::Parser perl module installed and it
> actually is:
>
> cpan[1]> *install XML::Parser*
> Reading '/Users/dani/.cpan/Metadata'
> Database was generated on Wed, 16 Sep 2015 16:41:02 GMT
> XML::Parser is up to date (2.44).
>
> Thanks for your help!
>
> Regards,
>
> Dani
>
> El 16/9/2015, a las 16:08, Sérgio Agostinho <sergio.r.agostinho at gmail.com>
> escribió:
>
> I think the issue is Gstreamer.java is going to the wrong place. I checked
> out your repo and tried
>
> You're running ndk from
> /android-tutorial-1/androidtutorial1/src/main
>
> Small disclaimer, I don't run 'android update project ...' before
> ndk-build, I simply specify the platform on ndk-build like this
> ndk-build APP_PLATFORM=14
>
> Gstreamer.java is going to
> /android-tutorial-1/androidtutorial1/src/main/src/org/freedesktop/gstreamer
>
> instead of
>
> /android-tutorial-1/androidtutorial1/src/main/java/org/freedesktop/gstreamer
>
>
> To correct this, add the following to the Android.mk, after you set the
> Gstreamer root folder.
> GSTREAMER_JAVA_SRC_DIR := java
>
> Try this and let me know.
>
> 2015-09-16 9:54 GMT+02:00 Daniel Marfil <danimarfil0 at gmail.com>:
>
>> FYI when trying to build it from terminal with:
>>
>> $chmod +x gradlew
>> $./gradlew assembleDebug
>>
>> I am getting the same error as in Android Studio.
>>
>> Regards,
>>
>> Dani
>>
>> El 16/9/2015, a las 2:59, Justin Kim <justin.joy.9to5 at gmail.com>
>> escribió:
>>
>> Hello,
>>
>> I’m not sure which version of cerbero you are using,
>> but I’ve seen ndk-build error like you when I used older version of
>> cerebro.
>>
>> Please, refer to this issue. your problem might be related to HOST_SED
>> problem with ndk r10e.
>>
>> https://bugzilla.gnome.org/show_bug.cgi?id=750162
>>
>> Best regards.
>> Justin
>>
>> On Sep 16, 2015, at 3:09 AM, Daniel Marfil <danimarfil0 at gmail.com> wrote:
>>
>> I have made some changes,
>> I have run this commands on the terminal:
>>
>> $android update project -p . -s --target 9
>> $ndk-build
>>
>> And now this is the return I get from ndk-build:
>>
>> Android NDK: WARNING: APP_PLATFORM android-14 is larger than
>> android:minSdkVersion 9 in ./AndroidManifest.xml
>> make: -n: Command not found
>> /bin/sh: - : invalid option
>> Usage: /bin/sh [GNU long option] [option] ...
>> /bin/sh [GNU long option] [option] script-file ...
>> GNU long options:
>> --debug
>> --debugger
>> --dump-po-strings
>> --dump-strings
>> --help
>> --init-file
>> --login
>> --noediting
>> --noprofile
>> --norc
>> --posix
>> --protected
>> --rcfile
>> --restricted
>> --verbose
>> --version
>> --wordexp
>> Shell options:
>> -irsD or -c command or -O shopt_option (invocation only)
>> -abefhkmnptuvxBCHP or -o option
>> /bin/sh: - : invalid option
>> Usage: /bin/sh [GNU long option] [option] ...
>> /bin/sh [GNU long option] [option] script-file ...
>> GNU long options:
>> --debug
>> --debugger
>> --dump-po-strings
>> --dump-strings
>> --help
>> --init-file
>> --login
>> --noediting
>> --noprofile
>> --norc
>> --posix
>> --protected
>> --rcfile
>> --restricted
>> --verbose
>> --version
>> --wordexp
>> Shell options:
>> -irsD or -c command or -O shopt_option (invocation only)
>> -abefhkmnptuvxBCHP or -o option
>> /bin/sh: - : invalid option
>> Usage: /bin/sh [GNU long option] [option] ...
>> /bin/sh [GNU long option] [option] script-file ...
>> GNU long options:
>> --debug
>> --debugger
>> --dump-po-strings
>> --dump-strings
>> --help
>> --init-file
>> --login
>> --noediting
>> --noprofile
>> --norc
>> --posix
>> --protected
>> --rcfile
>> --restricted
>> --verbose
>> --version
>> --wordexp
>> Shell options:
>> -irsD or -c command or -O shopt_option (invocation only)
>> -abefhkmnptuvxBCHP or -o option
>> /bin/sh: - : invalid option
>> Usage: /bin/sh [GNU long option] [option] ...
>> /bin/sh [GNU long option] [option] script-file ...
>> GNU long options:
>> --debug
>> --debugger
>> --dump-po-strings
>> --dump-strings
>> --help
>> --init-file
>> --login
>> --noediting
>> --noprofile
>> --norc
>> --posix
>> --protected
>> --rcfile
>> --restricted
>> --verbose
>> --version
>> --wordexp
>> Shell options:
>> -irsD or -c command or -O shopt_option (invocation only)
>> -abefhkmnptuvxBCHP or -o option
>> /bin/sh: - : invalid option
>> Usage: /bin/sh [GNU long option] [option] ...
>> /bin/sh [GNU long option] [option] script-file ...
>> GNU long options:
>> --debug
>> --debugger
>> --dump-po-strings
>> --dump-strings
>> --help
>> --init-file
>> --login
>> --noediting
>> --noprofile
>> --norc
>> --posix
>> --protected
>> --rcfile
>> --restricted
>> --verbose
>> --version
>> --wordexp
>> Shell options:
>> -irsD or -c command or -O shopt_option (invocation only)
>> -abefhkmnptuvxBCHP or -o option
>> /bin/sh: - : invalid option
>> Usage: /bin/sh [GNU long option] [option] ...
>> /bin/sh [GNU long option] [option] script-file ...
>> GNU long options:
>> --debug
>> --debugger
>> --dump-po-strings
>> --dump-strings
>> --help
>> --init-file
>> --login
>> --noediting
>> --noprofile
>> --norc
>> --posix
>> --protected
>> --rcfile
>> --restricted
>> --verbose
>> --version
>> --wordexp
>> Shell options:
>> -irsD or -c command or -O shopt_option (invocation only)
>> -abefhkmnptuvxBCHP or -o option
>> GStreamer : [GEN] => gst-build-armeabi/gstreamer_android.c
>> /bin/sh: i: command not found
>> make: [genstatic_armeabi] Error 127 (ignored)
>> /bin/sh: i: command not found
>> make: [genstatic_armeabi] Error 127 (ignored)
>> /bin/sh: i: command not found
>> make: [genstatic_armeabi] Error 127 (ignored)
>> /bin/sh: i: command not found
>> make: [genstatic_armeabi] Error 127 (ignored)
>> GStreamer : [COMPILE] => gst-build-armeabi/gstreamer_android.c
>> gst-build-armeabi/gstreamer_android.c:15:2: error: stray '@' in program
>> @PLUGINS_DECLARATION@
>> ^
>> gst-build-armeabi/gstreamer_android.c:15:22: error: stray '@' in program
>> @PLUGINS_DECLARATION@
>> ^
>> gst-build-armeabi/gstreamer_android.c:18:2: error: stray '@' in program
>> @G_IO_MODULES_DECLARE@
>> ^
>> gst-build-armeabi/gstreamer_android.c:15:3: error: unknown type name
>> 'PLUGINS_DECLARATION'
>> @PLUGINS_DECLARATION@
>> ^
>> gst-build-armeabi/gstreamer_android.c:18:23: error: stray '@' in program
>> @G_IO_MODULES_DECLARE@
>> ^
>> gst-build-armeabi/gstreamer_android.c:21:1: error: expected '=', ',',
>> ';', 'asm' or '__attribute__' before 'void'
>> void
>> ^
>> gst-build-armeabi/gstreamer_android.c:24:2: error: stray '@' in program
>> @PLUGINS_REGISTRATION@
>> ^
>> gst-build-armeabi/gstreamer_android.c:24:23: error: stray '@' in program
>> @PLUGINS_REGISTRATION@
>> ^
>> gst-build-armeabi/gstreamer_android.c: In function
>> 'gst_android_load_gio_modules':
>> gst-build-armeabi/gstreamer_android.c:31:2: error: stray '@' in program
>> @G_IO_MODULES_LOAD@
>> ^
>> gst-build-armeabi/gstreamer_android.c:31:20: error: stray '@' in program
>> @G_IO_MODULES_LOAD@
>> ^
>> gst-build-armeabi/gstreamer_android.c:31:3: error: 'G_IO_MODULES_LOAD'
>> undeclared (first use in this function)
>> @G_IO_MODULES_LOAD@
>> ^
>> gst-build-armeabi/gstreamer_android.c:31:3: note: each undeclared
>> identifier is reported only once for each function it appears in
>> gst-build-armeabi/gstreamer_android.c:32:1: error: expected ';' before
>> '}' token
>> }
>> ^
>> gst-build-armeabi/gstreamer_android.c: In function 'gst_android_init':
>> gst-build-armeabi/gstreamer_android.c:437:3: error: implicit declaration
>> of function 'gst_android_register_static_plugins'
>> [-Werror=implicit-function-declaration]
>> gst_android_register_static_plugins ();
>> ^
>> cc1: all warnings being treated as errors
>> make: *** [gst-build-armeabi/gstreamer_android.o] Error 1
>>
>> El 15/9/2015, a las 14:54, Sérgio Agostinho <sergio.r.agostinho at gmail.com>
>> escribió:
>>
>> If the Gstreamer.java is not showing anywhere it might also mean that
>> your not compiling the native code prior to the Java parts. Try running
>> ndk-build from the terminal and see if it's compiling and generating the
>> java file.
>>
>> Cheers
>>
>> 2015-09-15 14:49 GMT+02:00 Sérgio Agostinho <sergio.r.agostinho at gmail.com
>> >:
>>
>>> Hi Daniel,
>>>
>>> Can you dump your project folder and file structure and show your
>>> Android.mk content?
>>>
>>> Kind regards,
>>> Sérgio
>>>
>>> 2015-09-15 11:08 GMT+02:00 Daniel Marfil <danimarfil0 at gmail.com>:
>>>
>>>> Hi everyone,
>>>>
>>>> I am trying to run up-to-date 'GStreamer 1.0' tutorials (
>>>> http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials
>>>> ).
>>>>
>>>> I have already installed GStreamer 1.4.4 for OS X (
>>>> http://gstreamer.freedesktop.org/data/pkg/osx/1.4.4/), and I am
>>>> already using successfully the Android NDK.
>>>>
>>>> But when I try to build any of the applications from the tutorials I
>>>> get the next error:
>>>> Error:(20, 33) error: package org.freedesktop.gstreamer does not exist
>>>>
>>>> This is happening because it is not resolving this import statement:
>>>> import org.freedesktop.gstreamer.GStreamer;
>>>>
>>>> I have read that this is because while building, it should make a new
>>>> folder with GStreamer files, but that's not happening and I have no idea
>>>> why. I have already read many solutions but none is working to me.
>>>>
>>>> My NDK version is r10e, my Gradle version is 2.2.1 and its plugin is
>>>> 1.3.0. I am also using on gradle.properties the instruction:
>>>> android.useDeprecatedNdk=true
>>>>
>>>> I have set a path variable to the GStreamer SDK, on AndroidStudio ->
>>>> Preferences->Build, Execution, Deployment->Path Variables:
>>>> GSTREAMER_ROOT_ANDROID = /Volumes/HDD/Gstreamer/gst-sdk-debug-arm
>>>> GSTREAMER_SDK_ROOT_ANDROID = /Volumes/HDD/Gstreamer/gst-sdk-debug-arm
>>>>
>>>> Thank you very much for your help
>>>>
>>>> Dani
>>>>
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>>
>>>>
>>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150917/e98b6d63/attachment-0001.html>
More information about the gstreamer-devel
mailing list