GNOME Bugzilla – Bug 784465
android: Tutorials can't use 'android update project'
Last modified: 2018-11-03 11:03:37 UTC
In the recent Android SDK, the `android` command is deprecated and `and build` isn't supported anymore. Android recommands using gradle to build APK and even jni codes.
Created attachment 354816 [details] [review] RFC: Use gradle for tutorial-1
Review of attachment 354816 [details] [review]: To run this gradle script, GSTREAMER_ROOT_ANDROID must be set and PATH should include 'ndk-build'. In addition, user must create 'local.properties' which has two variables 'ndk.dir' and sdk.dir' by manual on the top of a project directory.
Also check this one for a gradle based build system: https://cgit.freedesktop.org/gstreamer/gst-examples/tree/playback/player/android
Oh, I wish I had known it earlier. I think it's better to close this issue.
No it's not :) The tutorials at https://cgit.freedesktop.org/gstreamer/gst-docs/tree/examples/tutorials should still be converted to gradle still
Created attachment 354827 [details] [review] RFC: Use gradle for tutorial-1 (updated)
(In reply to Sebastian Dröge (slomo) from comment #5) > No it's not :) The tutorials at > https://cgit.freedesktop.org/gstreamer/gst-docs/tree/examples/tutorials > should still be converted to gradle still Thanks. I merged mine and gst-player's gradle. If this patch is acceptable, I'll do for the rest with same manner.
I think it's okay to push this out. Sooner, rather than later, I'd like us to have a way to share the common snippet for setting up our bits because otherwise every time we change this, there are too many places to update.
Created attachment 355308 [details] [review] Build with gradle common snippets
*** Bug 787006 has been marked as a duplicate of this bug. ***
Thanks for this work, and sorry about the delayed response. Importing android-tutorial-1 into Android Studio, I get the following error: Error:No resolved dependencies found when searching for the jacoco version. FAILURE: Build failed with an exception. * Where: Script '/home/arun/code/gstreamer/gst-docs/examples/tutorials/android-gradle/android.gradle' line: 79 * What went wrong: A problem occurred configuring root project 'android-tutorial-1'. > Could not get unknown property 'compileReleaseJavaWithJavac' for root project 'android-tutorial-1' of type org.gradle.api.Project. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Oh, I haven't checked with Android Stdudio, I just did 'gradle build'. I'll take a look.
Arun, I think we are running in different environments. I ran this build in MacOS and it was built successfully. See the log below link. https://gist.github.com/justinjoy/40d57d463152f240462c6f98305032f3 I installed Android Studio 2.3.3 today again. and I did only to let it know PATH environment variable of mine.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-docs/issues/8.