I'm stuck. It's likely because I'm not an Android developer by trade, but I have been unable to figure out why things appear to build, but the Android app is unable to find certain GStreamer plugins. For me, I'm deploying the app to a Google Pixel 3a, Android 10.0, API 29. I do a fresh pull from the current master of this: https://github.com/centricular/gstwebrtc-demos. I've created for myself a build environment in a docker container that seems to (at least, I thought) work well for generating APKs from this project. When I interactively hop onto the container and do a "gradle build", the project builds and I get APKs. But when I deploy the resultant APK to my device and run it, I get an error saying "Failed to parse launch: no element "ahcsrc"". Most instances of this I've seen online have to do with a poorly written Android.mk file in the src/main/jni directory. But I don't know if that's the case here since it seems to check out. I suppose the only potential issue is that I'm building this on Windows, but I'm doing so under a WSL2-based docker container. To reproduce what I'm doing, 1) do a git pull on the above repository. \ 2) build an image using the Dockerfile at the end of this email. 3) Start a container with it. I do the following: docker run -v d:/repos/gstwebrtc-demos/android:/code -it --name gstreamer_builder brush/gstreamer_android /bin/bash 4) I then "cd" to /code once I'm in the container and type "gradle build". The APKs that are built exhibit this issue. Here is the Dockerfile: FROM ubuntu:latest USER root # Install Build Essentials # Install OpenJDK-8 # Fix certificate issues ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get install unzip && \ apt-get install build-essential -y && \ apt-get install wget -y && \ apt-get install file -y && \ apt-get install apt-utils -y && \ apt-get install vim -y && \ apt-get install pkg-config -y && \ apt-get install curl -y && \ apt-get install -y openjdk-8-jdk && \ apt-get install -y ant && \ apt-get install ca-certificates-java && \ apt-get install git -y && \ apt-get clean && \ update-ca-certificates -f; # Setup JAVA_HOME -- useful for docker commandline ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/ RUN export JAVA_HOME ENV GRADLE_VERSION 4.6 ENV GRADLE_SDK_URL <a href="https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip">https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip RUN mkdir /usr/local/gradle RUN curl -sSL "${GRADLE_SDK_URL}" -o gradle-${GRADLE_VERSION}-bin.zip \ && unzip gradle-${GRADLE_VERSION}-bin.zip -d /usr/local/gradle \ && rm -rf gradle-${GRADLE_VERSION}-bin.zip ENV GRADLE_HOME /usr/local/gradle/gradle-${GRADLE_VERSION} ENV PATH ${GRADLE_HOME}/bin:$PATH ANDROID_HOME="/usr/local/android-sdk" \ ANDROID_VERSION=28 \ ANDROID_BUILD_TOOLS_VERSION=27.0.3 # Download Android SDK RUN mkdir "$ANDROID_HOME" .android \ && cd "$ANDROID_HOME" \ && curl -o sdk.zip $SDK_URL \ && unzip sdk.zip \ && rm sdk.zip \ && mkdir "$ANDROID_HOME/licenses" || true \ && echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license" # && yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses # Install Android Build Tool and Libraries RUN $ANDROID_HOME/tools/bin/sdkmanager --update RUN $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \ "platforms;android-${ANDROID_VERSION}" \ "platform-tools" # Android NDK ENV ANDROID_NDK_VERSION r21b ENV ANDROID_NDK_URL <a href="http://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip">http://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip RUN curl -L "${ANDROID_NDK_URL}" -o android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip RUN unzip android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip -d /usr/local/android-ndk-${ANDROID_NDK_VERSION} RUN rm -rf android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip ENV ANDROID_NDK_HOME /usr/local/android-ndk-${ANDROID_NDK_VERSION} ENV PATH ${ANDROID_NDK_HOME}:$PATH #RUN chmod u+x ${ANDROID_NDK_HOME}/ -R ENV GSTREAMER_ANDROID_VERSION 1.16.1 RUN mkdir /usr/local/gstreamer RUN curl -L <a href="https://gstreamer.freedesktop.org/data/pkg/android/1.16.1/gstreamer-1.0-android-universal-${GSTREAMER_ANDROID_VERSION}.tar.xz">https://gstreamer.freedesktop.org/data/pkg/android/1.16.1/gstreamer-1.0-android-universal-${GSTREAMER_ANDROID_VERSION}.tar.xz -o /usr/local/gstreamer/gstreamer-1.0-android-universal-${GSTREAMER_ANDROID_VERSION}.tar.xz RUN tar -xf /usr/local/gstreamer/gstreamer-1.0-android-universal-${GSTREAMER_ANDROID_VERSION}.tar.xz -C /usr/local/gstreamer/ RUN rm -fr /usr/local/gstreamer/gstreamer-1.0-android-universal-${GSTREAMER_ANDROID_VERSION}.tar.xz ENV GSTREAMER_ROOT_ANDROID /usr/local/gstreamer/ ENV PATH ${GSTREAMER_ROOT_ANDROID}:$PATH ENV PATH /usr/local/gstreamer/armv7/include/gstreamer-1.0:$PATH _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |