I am trying to build the tutorials that are bundled with gstreamer-sdk-android-arm-debug-2013.6
. The Android.mk
file in the src/jni
directory (tutorial 1 project) references environment variables such as GSTREAMER_SDK_ROOT
. From what I have read, Android Studio does not use/pass environment variables to the build scripts. Is there a best practice for modifying makefiles and for defining/retrieving the key/value pairs required by the build scripts?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Ok, I have a working solution. You CAN pass environment variables to
ndk-build
(or any other process spawned by gradle Exec). In my case, I wanted to set these for both theclean
andbuild
tasks. This is is done usingtasks.withType(Exec)
. The environment parameter is set here for all Exec tasks.For
GSTREAMER_SDK_ROOT
, I added an entry tolocal.properties
:gst.dir=/Users/svenyonson/sdk/gstreamer-sdk-android-arm-debug-2013.6
For
PATH
, I used the default for the spawned process and added in what I needed.Here is a working version of
build.gradle
:The project now builds and runs. The only other things you will need to do is add
ndk.dir
to local.properties:One more thing: These examples will not build using
android-ndk-r10d
. Be sure to useandroid-ndk-r9d
.